标题:调试的时候的asp.net的异常
只看楼主
我FEI
Rank: 2
等 级:论坛游民
帖 子:87
专家分:27
注 册:2013-11-18
得分:0 
以下是引用冰镇柠檬汁儿在2015-4-30 09:04:26的发言:

先说第三条吧
<configuration>
  <appSettings>
    <add key="localizedperfcounter" value="..."/>
  </appSettings>
你找下web.config里有没有这样的配置,如果没有,则需要配置一个这样的东西,你到代码中找到报错的位置,看看这个是干什么用的,就应该知道是怎么配置value的值了

我里面没这个代码,自己试着加上了
    <add key="SQLCONNECTIONSTRING" value="data source=.;uid=sa;pwd=sasa;database=BookShopDB"></add>
                                    <add key="localizedperfcounter" value="true"/>
                                  </appSettings>

至于value的值,我看了看报错位置,是这个
程序代码:
 
            try
            {
                ///执行存储过程
                sqlHelper.RunProc("Pr_GetCategorys", out dr);
            }

自己不太懂,value值设成true了,好像可以,起码这两次运行没出现那个异常
2015-04-30 10:56
我FEI
Rank: 2
等 级:论坛游民
帖 子:87
专家分:27
注 册:2013-11-18
得分:0 
以下是引用冰镇柠檬汁儿在2015-4-30 09:08:15的发言:

第二个问题,应该配置在这样的标签结构中
<configuration>
  <system.web>
    <authorization>
      <allow users="*"/>
    </authorization>
    <identity impersonate="true" userName="nuc" password="" />
  </system.web>
</configuration>
你是不是配置错地方了?

以下是引用冰镇柠檬汁儿在2015-4-30 09:08:15的发言:

第二个问题,应该配置在这样的标签结构中
<configuration>
  <system.web>
    <authorization>
      <allow users="*"/>
    </authorization>
    <identity impersonate="true" userName="nuc" password="" />
  </system.web>
</configuration>
你是不是配置错地方了?

我是这么弄得,你看看
</authorization>
    <trace identity impersonate="true" userName="zhao" password="zhao" enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>
        <sessionState mode="InProc" timeout="20"/>
2015-04-30 11:02
我FEI
Rank: 2
等 级:论坛游民
帖 子:87
专家分:27
注 册:2013-11-18
得分:0 
以下是引用冰镇柠檬汁儿在2015-4-30 09:14:42的发言:

至于第一个问题,我也是在网上找的,以下是一个解决方案的引用:

请将此目录C:\WINDOWS\\Framework\v1.1.4322\Temporary Files设置成everyone可以“完全控制”即可。
这是进程预编译文件时因为缓存目录不可写导致的,和asp本身无关。您将的启动帐号设置为对此目录完全控制即可。在2003下,启动帐号为 network service ,将此用户设置为“完全控制”即可。若仍然不可以,就直接将设置everyone完全控制。

你用的windows系统登录帐号不是adminstrators组的?

应该是啊,我在控制面板的用户那里面看了看是管理员啊
2015-04-30 11:07
我FEI
Rank: 2
等 级:论坛游民
帖 子:87
专家分:27
注 册:2013-11-18
得分:0 
这是整个web.config的代码
程序代码:
<?xml version="1.0"?>
<configuration xmlns="http://schemas.">
    <!--
    <configSections>
        <section name="MicrosoftWebControls" type="System.Configuration.NameValueSectionHandler, System, System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    </configSections>
    <MicrosoftWebControls>
        <add key="CommonFiles" value="/website/webctrl_client/1_0" />
    </MicrosoftWebControls>
    -->
    <configSections>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup></configSections><appSettings>
        <add key="SQLCONNECTIONSTRING" value="data source=.;uid=sa;pwd=sasa;database=BookShopDB"></add>
      <add key="localizedperfcounter" value="true"/>
  </appSettings>
    <system.web>
        <compilation defaultLanguage="c#" debug="true">
            <assemblies>
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
        <pages buffer="true" enableViewStateMac="false" smartNavigation="false" validateRequest="false">
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages>
        <customErrors mode="RemoteOnly" defaultRedirect="DesktopModules/ErrorPage.aspx"></customErrors>
        <authentication mode="Windows"/>
        <httpRuntime maxRequestLength="10000" useFullyQualifiedRedirectUrl="true" executionTimeout="300"></httpRuntime>
        <authorization>
            <allow users="*"/>
        </authorization>
    <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>
        <sessionState mode="InProc" timeout="20"/>
        <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
        <httpHandlers>
            <remove verb="*" path="*.asmx"/>
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers>
        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web>
    <system.codedom>
            <compilers>
                <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
                    <providerOption name="CompilerVersion" value="v3.5"/>
                    <providerOption name="WarnAsError" value="false"/></compiler>
                <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
                    <providerOption name="CompilerVersion" value="v3.5"/>
                    <providerOption name="OptionInfer" value="true"/>
                    <providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom>
    <system.webServer>
            <validation validateIntegratedModeConfiguration="false"/>
        <modules>
            <remove name="ScriptModule"/>
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory"/>
            <remove name="ScriptHandlerFactoryAppServices"/>
            <remove name="ScriptResource"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></handlers></system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime>
</configuration>
2015-04-30 11:09
冰镇柠檬汁儿
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:北京
等 级:版主
威 望:120
帖 子:8074
专家分:6657
注 册:2005-11-7
得分:0 
呃,看迷糊了,如果我说的那些还解决不了问题,我也就没办法了,毕竟我很久没动

本来无一物,何处惹尘埃
It is empty at all here, Why pm 2.5 is so TMD high!
2015-04-30 12:44
我FEI
Rank: 2
等 级:论坛游民
帖 子:87
专家分:27
注 册:2013-11-18
得分:0 
回复 15楼 冰镇柠檬汁儿
还是很感谢你的帮助,听你这意思,你是转行了吗?
2015-04-30 15:48
冰镇柠檬汁儿
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:北京
等 级:版主
威 望:120
帖 子:8074
专家分:6657
注 册:2005-11-7
得分:0 
嗯,转做javascript很久了

本来无一物,何处惹尘埃
It is empty at all here, Why pm 2.5 is so TMD high!
2015-05-01 10:52



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-444562-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.119612 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved