简体   繁体   English

使用ASP.NET网站进行Daddy Economy Windows托管问题

[英]Go Daddy Economy Windows Hosting Issue with ASP.NET website

Go Daddy has told me the reason my website is not working is due to the web.config file but haven't, can't, or won't tell me why exactly. Go Daddy告诉我,我的网站无法正常运行的原因是由于web.config文件,但没有,不能,或者不会告诉我确切的原因。 I think it would be the same with any host using plesk. 我认为使用plesk的任何主机都一样。 I haven't added to or altered the web.config file that vs generated at all. 我还没有添加或更改过vs生成的web.config文件。 Anyone know what needs to be changed for the site to be hosted with plesk? 任何人都知道要通过plesk托管网站需要更改什么?

<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please 
visit
  https://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit 
http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework"
      type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, 
EntityFramework, Version=6.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089"
      requirePermission="false"/>
 </configSections>
  <connectionStrings>
    <add name="DefaultConnection"
      connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial 
 Catalog=aspnet-WebSite3-dc1d217f-11d8-4c59-a3eb- 
 70b83e3aa30f;AttachDbFilename=|DataDirectory|\aspnet-WebSite3-dc1d217f- 
11d8- 
4c59-a3eb-70b83e3aa30f.mdf;Integrated Security=SSPI"
      providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <system.web>
    <authentication mode="None"/>
    <compilation debug="true" targetFramework="4.6.2"/>
    <httpRuntime targetFramework="4.6.2"/>
   <pages>
      <namespaces>
    <add namespace="System.Web.Optimization"/>
    <add namespace="Microsoft.AspNet.Identity"/>
  </namespaces>
  <controls>
    <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" 
namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
      </controls>
    </pages>
    <membership>
      <providers>
        <!--
      ASP.NET Membership is disabled in this template. Please visit the following link https://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
    -->
    <clear/>
  </providers>
</membership>
<profile>
  <providers>
    <!--
      ASP.NET Membership Profile is disabled in this template. Please visit the following link https://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
    -->
    <clear/>
  </providers>
</profile>
<roleManager>
  <!--
        ASP.NET Membership Role is disabled in this template. Please visit the following link https://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
    -->
  <providers>
    <clear/>
  </providers>
</roleManager>
<!--
        If you are deploying to a cloud environment that has multiple web server instances,
        you should change session state mode from "InProc" to "Custom". In addition,
        change the connection string named "DefaultConnection" to connect to an instance
        of SQL Server (including SQL Azure and SQL  Compact) instead of to SQL Server Express.
  -->
<sessionState mode="InProc" customProvider="DefaultSessionProvider">
  <providers>
    <add name="DefaultSessionProvider"
      type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
      connectionStringName="DefaultConnection"/>
  </providers>
</sessionState>
  </system.web>
  <system.webServer>
    <modules>
      <remove name="FormsAuthentication"/>
</modules>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/>
    <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35"/>
    <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089"/>
    <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Owin" culture="neutral" publicKeyToken="31bf3856ad364e35"/>
    <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Owin.Security.OAuth" culture="neutral" publicKeyToken="31bf3856ad364e35"/>
    <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Owin.Security.Cookies" culture="neutral" publicKeyToken="31bf3856ad364e35"/>
    <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Owin.Security" culture="neutral" publicKeyToken="31bf3856ad364e35"/>
    <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
  </dependentAssembly>
  </assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, 
EntityFramework">
  <parameters>
    <parameter value="mssqllocaldb"/>
  </parameters>
</defaultConnectionFactory>
<providers>
  <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
</providers>
</entityFramework>
<system.codedom>
<compilers>
  <compiler language="c#;cs;csharp" extension=".cs"

type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
  <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
    type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
</compilers>
</system.codedom>
</configuration>

I having had to deploy a site to Go Daddy before so I am hoping that someone can shed some light on the subject. 我之前必须将网站部署到Go Daddy,所以我希望有人可以对此主题有所启发。

I don't get an error message attempting to browse the site, just the generic message that happens when an exception is thrown and the error can't be shown: 我没有收到尝试浏览网站的错误消息,只是抛出了异常且无法显示错误时发生的一般消息:

Server Error in '/' Application. “ /”应用程序中的服务器错误。 Runtime Error Description: An application error occurred on the server. 运行时错误说明:服务器上发生了应用程序错误。 The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). 该应用程序的当前自定义错误设置阻止应用程序错误的详细信息被远程查看(出于安全原因)。 It could, however, be viewed by browsers running on the local server machine. 但是,可以由运行在本地服务器计算机上的浏览器查看它。

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. 详细信息:要使此特定错误消息的详细信息在远程计算机上可见,请在当前Web应用程序根目录中的“ web.config”配置文件中创建一个标记。 This tag should then have its "mode" attribute set to "Off". 然后,该标签的“模式”属性应设置为“关”。

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL. 注意:可以通过修改应用程序配置标签的“ defaultRedirect”属性以指向自定义错误页面URL来用自定义错误页面替换当前看到的错误页面。

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

You need to change the Trust level of your web application. 您需要更改Web应用程序的信任级别。

Click here to know more. 点击这里了解更多。

事实证明,这比痛苦更痛苦,它建立了一个临时的html网站,并正在努力将托管网站迁移到AWS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM