asp.net-mvc – ‘/’应用程序中的服务器错误:系统找不到指定的
发布时间:2020-12-16 07:28:49 所属栏目:asp.Net 来源:网络整理
导读:嗨朋友,当我尝试打开网站时,我在互联网上发布了我的网站,我收到此错误: 我的应用程序在localhost上正常工作. 这是我的web.config: ?xml version="1.0" encoding="utf-8"?!-- For more information on how to configure your ASP.NET application,please vi
嗨朋友,当我尝试打开网站时,我在互联网上发布了我的网站,我收到此错误:
我的应用程序在localhost上正常工作. <?xml version="1.0" encoding="utf-8"?> <!-- For more information on how to configure your ASP.NET application,please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <configSections> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection,EntityFramework,Version=5.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" requirePermission="false" /> <!-- For more information on Entity Framework configuration,visit http://go.microsoft.com/fwlink/?LinkID=237468 --> </configSections> <connectionStrings> <clear /> <!--<add name="DefaultConnection" connectionString="Data Source=(LocalDb)v11.0;" providerName="System.Data.SqlClient"/>--> <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Server=myServer;Database=myDatabase;User Id=myUser;Password=myPassword;" /> </connectionStrings> <appSettings> <add key="webpages:Version" value="2.0.0.0" /> <add key="webpages:Enabled" value="false" /> <add key="PreserveLoginUrl" value="true" /> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> </appSettings> <system.web> <customErrors mode="Off" /> <compilation targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> <authentication mode="Forms"> <forms loginUrl="~/Account/Login" timeout="2880" /> </authentication> <pages> <namespaces> <add namespace="System.Web.Helpers" /> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Optimization" /> <add namespace="System.Web.Routing" /> <add namespace="System.Web.WebPages" /> </namespaces> </pages> <roleManager enabled="true" defaultProvider="simple"> <providers> <clear /> <add name="simple" type="WebMatrix.WebData.SimpleRoleProvider,WebMatrix.WebData" /> </providers> </roleManager> <membership defaultProvider="simple"> <providers> <clear /> <add name="simple" type="WebMatrix.WebData.SimpleMembershipProvider,WebMatrix.WebData" /> </providers> </membership> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <handlers> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <add name="mvc" path="*.mvc" verb="*" modules="IsapiModule" scriptProcessor="C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" /> <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%Microsoft.NETFrameworkv4.0.30319aspnet_isapi.dll" preCondition="classicMode,bitness32" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%Microsoft.NETFramework64v4.0.30319aspnet_isapi.dll" preCondition="classicMode,bitness64" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> </handlers> </system.webServer> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory,EntityFramework"> <parameters> <parameter value="Data Source=(localdb)v11.0; Integrated Security=True; MultipleActiveResultSets=True" /> </parameters> </defaultConnectionFactory> </entityFramework> </configuration> 我怎么解决这个问题 解决方法
您似乎无法从托管Web应用程序的服务器访问您在连接字符串中指定的SQL服务器:
Server=myServer;Database=myDatabase;User Id=myUser;Password=myPassword; 联系您的网络管理员. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- ASP.Net HttpHandler ProcessRequest()触发两次
- asp.net – 无法在应用程序级别下定义元素’buildProviders
- Task.Factory.StartNew在ASP.Net MVC中有帮助或有害吗?
- 为什么ASP.NET接受外部创建的会话标识符?
- asp.net-mvc-3 – signalR维护用户连接ID
- asp.net-mvc – 如何使用枚举值填充下拉列表?
- asp.net-mvc – MVC 4中app.config的等价物
- asp.net – VS 2012发布:找不到有效的AspnetMergePath
- 在ASP.net页面中嵌入SVG
- asp.net-web-api – 使用WIF和OWIN中间件的角色与声明授权A
推荐文章
站长推荐
- asp.net-mvc – 编译错误“无法在Web部署项目中加
- 用HttpClientFactory来实现简单的熔断降级
- asp.net – Telerik RadAjaxManager仍然回发
- asp.net-mvc – ASP.NET MVC使用相同的控制器分离
- asp.net – 命名空间“系统”中不存在类型或命名
- asp.net-mvc – Telerik mvc grid,columns.bound
- 在ASP.Net中防止SQL注入
- asp.net-mvc – 如何在mvc4的cshtml视图页面中的
- asp.net – 仅限RadComboBox下拉列表
- asp.net-mvc-4 – 在.cshtml文件中设置断点 – V
热点阅读