网站托管错误再次 [英] website hosting error again

查看:73
本文介绍了网站托管错误再次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我在平行面板中托管我的网站并在互联网上查看时显示错误:

hi
when i hosted my website in parallel panel and viewed in internet it showing error :

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 <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->
<pre lang="xml"><configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>





注意:通过修改应用程序< customErrors>的defaultRedirect属性,可以将自己看到的当前错误页面替换为自定义错误页面。配置标记指向自定义错误页面URL。





<! - Web.Config配置文件 - > < br $> b $ b



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 <customErrors> configuration tag to point to a custom error page URL.


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

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





然后我在我的web.configuration中添加了这段代码:





Then i added this code in my web.configuration:

<configuration>
	<connectionstrings>
  <add name="ApplicationServices" connectionstring="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true">
   providerName="System.Data.SqlClient" />
  <add name="CRegConnectionString" connectionstring="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True">
   providerName="System.Data.SqlClient" />
  <add name="RegConnectionString" connectionstring="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Databasenw.mdf;Integrated Security=True;User Instance=True">
   providerName="System.Data.SqlClient" />
 </add></add></add></connectionstrings>
	<system.web>
    <customerrors mode="RemoteOnly" defaultredirect="default.aspx" />
  <authorization>
   <allow roles="Admin" />
  </authorization>
 ............



然后再次托管website.it显示相同的错误。为什么它显示如下?


then again hosted the website.it showing the same error .why it is showing like this?

推荐答案

错误消息已包含明确说明 - 该怎么做?



在web.config中添加行

customErrors mode =RemoteOnlydefaultRedirect =mycustompage.htm

with

customErrors mode =Off



正如错误信息所示。





实际上,你不知道发生了什么错误。这可能有几个原因。可能是某些IIS设置问题或与web.config相关的任何其他问题。

一旦在web.config中添加该行并运行,您现在将看到错误的确切原因。


解决实际导致应用程序抛出异常的错误,你就完成了。



我肯定你将能够找到错误的确切原因并自行解决。

祝你好运!



干杯
The error message has clearly stated - what to do?

Add the lines in web.config
customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"
with
customErrors mode="Off"

just as shown in the error message.


Actually, you did not know what inter error happened. This could be of several reasons. Could be some IIS setting issue or any other issue related to web.config.
Once you add the line in web.config and run, you will now see the exact cause of the error.

Work out on the error that actually causes the application to throw exception and you are done.

I am sure you will be able to get the exact cause of the error and fix it by yourself.
Good Luck!

Cheers


消息本身非常自我解释。



您需要将默认文档添加到IIS设置。

您的目录浏览设置为关闭,可能您输入的网址如

www.your-domain.com,IIS无法找到默认页面。



处理此问题的两种方法 -

1.将您的默认文档(即第一个文档可能是login.aspx或default.aspx或您的aspx页面)添加到IIS设置< br $> b $ b

2。你添加一个简单的index.htm或index.html



在index.htm中,添加一个javascript代码将页面重定向到你的aspx

window.location.href =www.your-domain.com/login.aspx



解决问题非常简单。



干杯
The message itself is very self explanatory.

Youy need to add your default document to IIS settings.
Your directory browsing is set to off and probably you are entering the url like
www.your-domain.com and IIS could not locate the default page.

two ways to handle this -
1. Add your default document (i.e the first document may be login.aspx or default.aspx or whatever your aspx page is) to IIS settings

2. You add a simple index.htm or index.html

In the index.htm, add a javascript code to redirect the page to your aspx
window.location.href = "www.your-domain.com/login.aspx"

Pretty simple to solve your problem.

Cheers


这篇关于网站托管错误再次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆