0

I published an asp.net website to a webserver which can be managed through a control panel called websitepanel (websitepanel.net). I published the website through ftp to the web server.

xyzwebsite.com - this works! and shows Default.aspx page

xyzwebsite.com/Default.aspx and xyzwebsite.com/Default - Not working and shows the following but page actually exists and the directory also exists.

404 error

The actual structure as seen in control panel of web server:


The control panel files structure

But in my local IIS it works fine. Do any of you have any insights about this because I am new to this kind of stuff's so any clue will be very much appreciated :)

4

4 回答 4

0

一种解决方法是执行域重定向,如下所示:

(你应该使用正则表达式的模式)

 <rule name="Domain redirect" >
 <match url="*" />
 <conditions>
 <add input="{HTTP_HOST}" pattern="^.+$" />
 </conditions>
 <action type="Redirect" url="http://www.mydummysite.com/{R:0}" />
 </rule>

祝你好运,希望有帮助。

于 2016-03-21T15:04:23.917 回答
0

1) 首先要验证的是,您的域是否正确指向了您上传网站的服务器。

2) 如果您能够仅使用 xyzwebsite.com 浏览 Default.aspx 页面,那么 xyzwebsite.com/Default.aspx 不应出现任何错误。

3) 要运行 xyzwebsite.com/Default,您必须将文件夹“Default”设置为虚拟目录并设置它自己的默认页面。为了实现它,本教程将为您提供帮助。

于 2016-03-22T08:14:11.310 回答
0

您需要确保或让主机确认,Application Server windows 功能安装在远程服务器上,包括 ASP.NET 功能。

于 2016-03-21T14:56:57.223 回答
0

我刚刚在 web.config 的标签中添加了以下属性,<Modules>这解决了我的问题。

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
.......
于 2016-05-01T19:17:12.460 回答