出现<add assembly="*"/>错误的解决方法:

本文介绍了解决因配置文件错误导致的服务请求失败问题的方法。具体包括分析器错误信息提示及源错误定位,通过重建索引或关闭索引服务来修复问题的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。
分析器错误信息: 访问被拒绝:“Microsoft.Web.UI.WebControls”。
源错误:

行 196:				<add assembly="System.EnterpriseServices, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
行 197:				<add assembly="System.Web.Mobile, Version=1.0.5000.0,Culture=
neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
行 198:				<add assembly="*"/>
行 199:			</assemblies>
行 200:		</compilation>
(一)重建索引:

      1 开始-管理工具-计算机管理
      2 “服务和应用程序”-->“索引服务”-->“System”-->“目录”
      3 在“目录”右击,“新建”-“目录”
      4 “c:\WINDOWS\Microsoft.Net\Framework\选择Asp.Net版本号\Temporaty ASP.NET Files”目录。
      5 “包含在索引中吗?”选否。
      6 确定。 7 重启“索引服务”(右键)。

(二)实在不行关闭索引。

转载于:https://www.cnblogs.com/dotnets/archive/2007/07/24/829611.html

<?xml version="1.0" encoding="utf-8"?> <!-- 有关如何配置 ASP.NET 应用程序的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <connectionStrings> <add name="DB-NetShopsConnectionString" connectionString="Data Source=.\MSSQLSERVER2012;Initial Catalog=DB-NetShops;User ID=sa;Password=your_password;Integrated Security=False" providerName="System.Data.SqlClient" /> </connectionStrings> <system.web> <!-- 添加全局cookie设置 --> <httpCookies httpOnlyCookies="true" /> <compilation debug="true" targetFramework="4.7.2" /> <httpRuntime targetFramework="4.7.2" maxRequestLength="20480" executionTimeout="300" requestValidationMode="4.7.2" /> <!-- 移除httpOnlyCookies属性 --> <sessionState mode="InProc" timeout="20" /> <authentication mode="Forms"> <!-- 移除httpOnlyCookies属性 --> <forms loginUrl="~/WebForm1.aspx" defaultUrl="~/WebForm2.aspx" timeout="20" /> </authentication> <globalization culture="zh-CN" uiCulture="zh-CN" requestEncoding="utf-8" responseEncoding="utf-8" /> <customErrors mode="RemoteOnly" defaultRedirect="~/Error.aspx"> <error statusCode="404" redirect="~/404.aspx" /> <error statusCode="500" redirect="~/500.aspx" /> </customErrors> <pages masterPageFile="~/Site.master"> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </controls> </pages> </system.web> <system.webServer> <httpProtocol> <customHeaders> <add name="X-Content-Type-Options" value="nosniff" /> <add name="X-Frame-Options" value="SAMEORIGIN" /> <add name="X-Xss-Protection" value="1; mode=block" /> </customHeaders> </httpProtocol> <staticContent> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" /> </staticContent> <security> <requestFiltering> <requestLimits maxAllowedContentLength="20971520" /> </requestFiltering> </security> </system.webServer> <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" /> </compilers> </system.codedom> </configuration> 添加母版页代码设置,生成完整webconfig代码
06-12
<?xml version="1.0" encoding="utf-8"?> <!-- 有关如何配置 ASP.NET 应用程序的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkId=301879 --> <configuration> <appSettings> <add key="webpages:Version" value="3.0.0.0" /> <add key="webpages:Enabled" value="false" /> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> <add key="PostUserID" value="Allgo" /> <add key="PostPassword" value="Allgo2024" /> <!-- Allgo Database Connection Configuration --> <add key="SeverIP" value="47.250.46.2,1433" /> <add key="Database" value="VMSDB" /> <add key="UserId" value="sa" /> <add key="PWD" value="Allgo@2020" /> <!-- Common Parameters Configuration --> <add key="TimeOutValue" value="10" /> <add key="DateFormat" value="M/d/yyyy" /> <add key="DateTimeFormat" value="M/d/yyyy HH:mm:ss.fff" /> <add key="TimeFormat" value="HH:mm:ss" /> </appSettings> <system.web> <compilation targetFramework="4.7.2" /> <httpRuntime targetFramework="4.7.2" /> </system.web> <system.webServer> <handlers> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <remove name="OPTIONSVerbHandler" /> <remove name="TRACEVerbHandler" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> </handlers> </system.webServer> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" /> <bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /> <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Microsoft.Web.Infrastructure" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-5.2.9.0" newVersion="5.2.9.0" /> </dependentAssembly> </assemblyBinding> </runtime> <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" /> <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" /> </compilers> </system.codedom> </configuration> <!--ProjectGuid: 75F8D488-D85A-488A-AFEB-2E93D5646800-->
06-18
<?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <gcAllowVeryLargeObjects enabled="true" /> </runtime> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System"> <section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> </sectionGroup> </configSections> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/> </startup> <log4net> <appender name="SystemLogger" type="log4net.Appender.RollingFileAppender"> <file type="log4net.Util.PatternString" value="log\\info\\%date{yyyy-MM-dd}\\%date{yyyy-MM-dd}.log"/> <appendToFile value="true"/> <maximumFileSize value="1024KB"/> <rollingStyle value="size"/> <staticLogFileName value="true"/> <maxSizeRollBackups value="10"/> <lockingModel type="log4net.Appender.FileAppender+MinimalLock"/> <datePattern value="yyyyMMdd-HH:mm:ss"/> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date %-5level - %message%newline"/> </layout> <filter type="log4net.Filter.LevelRangeFilter"> <levelMin value="INFO"/> <levelMax value="INFO"/> </filter> </appender> <appender name="SystemLogger_Debug" type="log4net.Appender.RollingFileAppender"> <file type="log4net.Util.PatternString" value="log\\Debug\\%date{yyyy-MM-dd}\\%date{yyyy-MM-dd}.Debug"/> <appendToFile value="true"/> <maximumFileSize value="1024KB"/> <rollingStyle value="size"/> <staticLogFileName value="true"/> <maxSizeRollBackups value="10"/> <lockingModel type="log4net.Appender.FileAppender+MinimalLock"/> <datePattern value="yyyyMMdd-HH:mm:ss"/> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date %-5level - %message%newline"/> </layout> <filter type="log4net.Filter.LevelRangeFilter"> <levelMin value="DEBUG"/> <levelMax value="DEBUG"/> </filter> </appender> <appender name="SystemLogger_Error" type="log4net.Appender.RollingFileAppender"> <file type="log4net.Util.PatternString" value="log\\error\\%date{yyyy-MM-dd}.log"/> <appendToFile value="true"/> <maximumFileSize value="1024KB"/> <rollingStyle value="size"/> <staticLogFileName value="true"/> <maxSizeRollBackups value="10"/> <lockingModel type="log4net.Appender.FileAppender+MinimalLock"/> <datePattern value="yyyyMMdd-HH:mm:ss"/> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date %-5level - %message%newline"/> </layout> <filter type="log4net.Filter.LevelRangeFilter"> <levelMin value="ERROR"/> <levelMax value="FATAL"/> </filter> </appender> <root> <level value="ALL"/> <appender-ref ref="SystemLogger"/> <appender-ref ref="SystemLogger_Error"/> <appender-ref ref="SystemLogger_Debug"/> </root> </log4net> </configuration> 错误在哪?
最新发布
08-08
取出英文<s:String x:Key="ReturnMain">Back</s:String> <s:String x:Key="lblGroupNum">GroupNumber:</s:String> <s:String x:Key="lblRLRefPoint">RL Ref Point:</s:String> <s:String x:Key="lblResetGroup">ResetGroup</s:String> <s:String x:Key="PointA">Point A</s:String> <s:String x:Key="PointB">Point B</s:String> <s:String x:Key="lblConfig">ConfigSet</s:String> <s:String x:Key="lblRef">Ref</s:String> <s:String x:Key="lblBasicInfo">BasicInfo</s:String> <s:String x:Key="lblSystem">SystemSet</s:String> <s:String x:Key="lblSingleMode">Single-channel</s:String> <s:String x:Key="lblSelectAll">Select All</s:String> <s:String x:Key="lblCancelAll">Cancel All</s:String> <s:String x:Key="lblInvertSelection">Invert</s:String> <s:String x:Key="lblWaveLength">Wavelength</s:String> <s:String x:Key="lblTestMode">Test Mode</s:String> <s:String x:Key="lblRLLenthInfo">RL Lenth Information</s:String> <s:String x:Key="lblILRefSet">IL Ref Setting</s:String> <s:String x:Key="lblILRefSetAsFollow">IL Ref Setting is as follows: </s:String> <s:String x:Key="lblILRefAll">Ref All</s:String> <s:String x:Key="lblILGroupRef">Group Ref</s:String> <s:String x:Key="lblAddNewGroup">Add New Group</s:String> <s:String x:Key="lblResetAll">Reset All</s:String> <s:String x:Key="lblDeleteGroup">Delete</s:String> <s:String x:Key="lblClear">Clear </s:String> <s:String x:Key="lblAdd">Add</s:String> <s:String x:Key="lblSaveGroupSet">Save</s:String> <s:String x:Key="lblRLRefSet">RL Ref Setting</s:String> <s:String x:Key="lblRLRefSetAsFollow">RL Ref Setting is as follows:</s:String> <s:String x:Key="lblRLLengthAvailuable">Adjustable Length</s:String> <s:String x:Key="lblRlLengthUnavailuable">Fixed Length</s:String> <s:String x:Key="lblRLRefChannel">Channel</s:String> <s:String x:Key="lblBatchoperation">Batch</s:String> <s:String x:Key="lblSaveConfigure">Save</s:String> <s:String x:Key="lblPoint1">Length1</s:String> <s:String x:Key="lblPoint2">Length2</s:String> <s:String x:Key="lblPoint1Length">Point1 Length</s:String> <s:String x:Key="lblPoint2Length">Point2 Length</s:String> <s:String x:Key="lblSetLengthTitle">SetLength</s:String> <s:String x:Key="lblSetLength">SetLength</s:String> <s:String x:Key="lblRLRefLength">RLRefLength</s:String> <s:String x:Key="lbl0-150">0~150meter</s:String> <s:String x:Key="lbl150-1000">150~1000meter</s:String> <s:String x:Key="lblQuickTestSetup">QuickTestSetup(+/F9)</s:String> <s:String x:Key="lblStepTesting">StepTesting</s:String> <s:String x:Key="lblTestAll">TestAll</s:String> <s:String x:Key="lblPassSkip">PassSkip</s:String> <s:String x:Key="lblSkipAll">SkipAll</s:String> <s:String x:Key="lblTestSequence">TestSequence</s:String> <s:String x:Key="lblSNIndependentofTestComplete">SN Independent of Test Complete</s:String> <s:String x:Key="lblSNLock">Lock SN Until Test Complete</s:String> <s:String x:Key="lblRework">Rework Option</s:String> <s:String x:Key="lblHideRework">Hide Rework Option</s:String> <s:String x:Key="lblShowRework">Show Rework Option</s:String> <s:String x:Key="lblBranchSN">Branch SN</s:String> <s:String x:Key="lblHideBranchSN">Hide Branch SN</s:String> <s:String x:Key="lblShowBranchSN">Show Branch SN</s:String> <s:String x:Key="lblUniqueSNPerConnector">Unique SN Per Connector</s:String> <s:String x:Key="lblSharedSNforCableAssembly">Shared SN for Cable Assembly</s:String> <s:String x:Key="lblLivedata">Live data</s:String>
08-05
<Window x:Class="SelfMeet.Cameras.QianDaoVaid" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:SelfMeet.Cameras" xmlns:ctl="clr-namespace:SelfMeet.Controls" mc:Ignorable="d" Title="人脸验证" Height="800" Width="1400" Style="{StaticResource TixunWindow}"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> <RowDefinition Height="*"/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <Grid Grid.Row="0"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> <ToggleButton x:Name="bt_Set" Visibility="Collapsed" HorizontalAlignment="Right" IsChecked="{Binding IsCameSetting,Mode=TwoWay}" FontSize="36" Style="{StaticResource TixunToggleButton}" Content="&equiv;" ToolTip="摄像头设置"/> <Popup AllowsTransparency="True" x:Name="bt_pop" IsOpen="{Binding ElementName=bt_Set,Path=IsChecked}" FlowDirection="LeftToRight" PlacementTarget="{Binding ElementName=bt_Set}" VerticalOffset="0" HorizontalOffset="-160"> <Grid Width="300" Background="#66000000" > <StackPanel Orientation="Vertical" Margin="10" > <TextBlock Text="摄像头:" Foreground="LightGray" Margin="10,0"/> <ComboBox DisplayMemberPath="Name" ItemsSource="{Binding CameraList}" SelectedItem="{Binding SLDCamera,UpdateSourceTrigger=PropertyChanged}" Margin="10,2"/> <TextBlock Text="清析度:" Foreground="LightGray" Margin="10,0"/> <ComboBox DisplayMemberPath="Name" ItemsSource="{Binding PixelList}" SelectedItem="{Binding SLDPixel,UpdateSourceTrigger=PropertyChanged}" Margin="10,2" /> <TextBlock Text="旋转:" Foreground="LightGray" Margin="10,0"/> <ComboBox ItemsSource="{Binding CameraFlipList}" SelectedItem="{Binding SLDCameraFlip,UpdateSourceTrigger=PropertyChanged}" Margin="10,2" /> <TextBlock Text="爆光度:" Foreground="LightGray" Margin="10,0"/> <DockPanel Margin="10,2"> <Button Content="-" Click="Exposure_Sub" FontSize="14" FontWeight="Bold" ToolTip="減少" DockPanel.Dock="Left" ></Button> <Button Content="+" Click="Exposure_Add" FontSize="14" FontWeight="Bold" ToolTip="增加" DockPanel.Dock="Right"></Button> <DockPanel > <TextBlock Text="{Binding MinExposure}" Foreground="LightGray" HorizontalAlignment="Right" FontSize="10" VerticalAlignment="Center" DockPanel.Dock="Left"/> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right"> <TextBlock Text="{Binding MaxExposure}" FontSize="10" Margin="-3,0,5,0" Foreground="LightGray" HorizontalAlignment="Left" VerticalAlignment="Center"/> <TextBox Text="{Binding ValueExposure}" Style="{StaticResource BaseStyle}" Background="#33FFFFFF" FontSize="16" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" /> </StackPanel> <Grid> <Slider x:Name="Exposure_Value" Value="{Binding ValueExposure,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="White" TickPlacement="BottomRight" Maximum="{Binding MaxExposure}" Minimum="{Binding MinExposure}" SmallChange="{Binding SetpExposure}" VerticalAlignment="Center" /> </Grid> </DockPanel> </DockPanel> </StackPanel> </Grid> </Popup> <Button x:Name="bt_Close" PreviewMouseDown="bt_Close_PreviewMouseDown" Content="✕" Style="{StaticResource TixunToolButton}" HorizontalAlignment="Right" VerticalAlignment="Top"/> </StackPanel> </Grid> <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Grid.Row="1"> <TextBlock Text="请要求待拘人员" FontSize="36" TextAlignment="Center" Foreground="White"/> <TextBlock Text="面对屏幕并保持正脸在框选区域" FontSize="36" TextAlignment="Center" Foreground="White"/> </StackPanel> <Grid Grid.Row="2" Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}},Path=ActualWidth,Converter={StaticResource RatioConverter},ConverterParameter=80}" Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}},Path=ActualHeight,Converter={StaticResource RatioConverter},ConverterParameter=75}" VerticalAlignment="Top"> <Border Background="#33FFFFFF" CornerRadius="20" Margin="10" HorizontalAlignment="Center" Grid.Column="0"> <Grid> <Image Name="CamImage" VerticalAlignment="Center" Margin="10" Source="{Binding CameraImage,Converter={StaticResource FaceCameraConverter}}" /> <TextBlock Text="{Binding WathTimer}" Foreground="Red" FontSize="36" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="20" /> </Grid> </Border> </Grid> <ctl:CopyVerseion Grid.Row="3" Foreground="White"/> <ProgressBar x:Name="PressBar" Grid.Row="2" Style="{StaticResource ArcProgressBarStyle}"></ProgressBar> </Grid> </Window> 这是源代码,报错是这行 <ctl:CopyVerseion Grid.Row="3" Foreground="White"/>
08-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值