麻雀企业管理系统2.5 在VS里启动正常 但在IIS里就报 "系统找不到指定的文件。 "的错误 有人用过这个系统没? 好象是URL重写或解析方面的问题,谁有思路 谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在 IIS 管理器中,展开本地计算机,展开“网站”,右键单击物理目录已被删除的网站,然后单击“属性”。 在网站“属性”对话框的“主目录”选项卡上,单击“浏览”。 在“浏览文件夹”对话框中找到包含网站内容的文件夹,或单击“新建文件夹”创建一个放置内容的文件夹,然后单击“确定”。 单击“应用”,然后单击“确定”。 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i 这些办法我都试过 部署过程肯定是没问题的 访问其中的Aspx文件都没问题, 但访问其他动态生成的链接 例如这样 http://localhost:8090/ent/news-4.htm 就会出现404错误 找不到文件 应该重定向到Aspx文件进行处理的 下面是web.config里面 关于重定向规则的内容 <RewriterConfig> <Rules> <RewriterRule> <LookFor>~/default.htm</LookFor> <SendTo>~/default.aspx</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/bbs.htm</LookFor> <SendTo>~/bbs.aspx</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/notices.htm</LookFor> <SendTo>~/notices.aspx</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/news-type-(\d+)\.htm</LookFor> <SendTo>~/news-type.aspx?typeid=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/news-(\d+)\.htm</LookFor> <SendTo>~/news.aspx?newsid=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/notice-(\d+)\.htm</LookFor> <SendTo>~/notice.aspx?noticeid=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/product-type-(\d+)\.htm</LookFor> <SendTo>~/product-type.aspx?typeid=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/product-(\d+)\.htm</LookFor> <SendTo>~/product.aspx?productid=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/other-(\d+)\.htm</LookFor> <SendTo>~/other.aspx?otherid=$1</SendTo> </RewriterRule> </Rules> </RewriterConfig> 重写规则中没有看到类似ent/....htm的,那你的目录下就得真实的存在这个文件的,否则就会报错你可以尝试在config加上这种规则 那是由于系统放在IIS下的ent虚拟目录下 现在我放在iis根下面了 还是那个问题 如下所示: http://localhost:8090/default.htm 找不到网页正在查找的网页可能已被删除、重命名或暂时不可用。请尝试执行下列操作: * 如果是在“地址”栏中键入了网页地址,请检查其拼写是否正确。 * 打开 localhost:8090 主页,然后查找与所需信息相关的链接。 * 单击后退按钮尝试其他链接。HTTP 错误 404 - 找不到文件Internet 信息服务技术信息(用于支持人员) * 详细信息: Microsoft 支持 你用的确实是8090端口吗?直接在IIS里,点击网页直接浏览,看看是否还是404 iis设置吧,可以重新发布吗? 我怀疑是网站配置文件中关于地址转发的问题 下面是完整的 web.config, 请各位大侠看看, 在IIS6/IIS7 + .net 2.0( C#) 的环境下, 有没有问题 <?xml version="1.0" encoding="gb2312"?><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <configSections> <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" /> </configSections> <connectionStrings> <add name="Conn" connectionString="App_data/#data.mdb" /> <add name="website" connectionString="麻雀工作室" /> <add name="cleanword" connectionString="00xx" /> <add name="upimagetype" connectionString=".gif|.jpg|.jpeg|.png" /> <add name="upimagesize" connectionString="250" /> <add name="skin" connectionString="free" /> </connectionStrings> <RewriterConfig> <Rules> <RewriterRule> <LookFor>~/default.htm</LookFor> <SendTo>~/default.aspx</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/bbs.htm</LookFor> <SendTo>~/bbs.aspx</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/notices.htm</LookFor> <SendTo>~/notices.aspx</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/news-type-(\d+)\.htm</LookFor> <SendTo>~/news-type.aspx?typeid=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/news-(\d+)\.htm</LookFor> <SendTo>~/news.aspx?newsid=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/notice-(\d+)\.htm</LookFor> <SendTo>~/notice.aspx?noticeid=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/product-type-(\d+)\.htm</LookFor> <SendTo>~/product-type.aspx?typeid=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/product-(\d+)\.htm</LookFor> <SendTo>~/product.aspx?productid=$1</SendTo> </RewriterRule> <RewriterRule> <LookFor>~/other-(\d+)\.htm</LookFor> <SendTo>~/other.aspx?otherid=$1</SendTo> </RewriterRule> </Rules> </RewriterConfig> <system.web> <httpHandlers> <add verb="*" path="*.htm" type="URLRewriter.RewriterFactoryHandler, URLRewriter" /> </httpHandlers> <compilation debug="true" defaultLanguage="c#" /> <authentication mode="Windows" /> <customErrors defaultRedirect="default.htm" mode="RemoteOnly" /> <globalization requestEncoding="gb2312" responseEncoding="gb2312" /> <pages validateRequest="false" autoEventWireup="false" /> <httpRuntime maxRequestLength="20480" executionTimeout="45" /> </system.web> <appSettings> <add key="FCKeditor:BasePath" value="~/FCKeditor/" /> </appSettings></configuration> http://localhost:8090/news-4.htm 像这样的网页本身是不存在的, 是通过web.config中的地址转发转给对应的aspx进行处理动态生成的 很可能是配置文件什么地方不对, 尤其是关于*.htm转发的地方, 我不知道怎么改 配置文件没看出什么问题.如果本地正常,IIS报错的话,应该就是你IIS设置没有正确导致的 gridview 查询后翻页的问题 我把明日科技的考试系统自动生成的题号转换为数组用下面代码提示错误 网页显示与打印出来的效果不一样怎么办啊? 所有.net程序运行到connection.open()报错 快崩溃了,vs2003忽然不能调试了,郁闷。。 日期格式转换 求救!!水晶报表导出execl的问题,为什么格式不对?非常郁闷!看谁能解决! 怎样让弹出窗口得到焦点 在.aspx里面怎么实现弹出消息框? asp.net中调用excel问题 急!!! 高分求思路或源码 对动态生成控件熟悉的来帮我看看啊,搞不出来啊
部署过程肯定是没问题的
访问其中的Aspx文件都没问题,
但访问其他动态生成的链接
例如这样
http://localhost:8090/ent/news-4.htm 就会出现404错误 找不到文件
应该重定向到Aspx文件进行处理的
下面是web.config里面 关于重定向规则的内容 <RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/default.htm</LookFor>
<SendTo>~/default.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/bbs.htm</LookFor>
<SendTo>~/bbs.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/notices.htm</LookFor>
<SendTo>~/notices.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/news-type-(\d+)\.htm</LookFor>
<SendTo>~/news-type.aspx?typeid=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/news-(\d+)\.htm</LookFor>
<SendTo>~/news.aspx?newsid=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/notice-(\d+)\.htm</LookFor>
<SendTo>~/notice.aspx?noticeid=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/product-type-(\d+)\.htm</LookFor>
<SendTo>~/product-type.aspx?typeid=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/product-(\d+)\.htm</LookFor>
<SendTo>~/product.aspx?productid=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/other-(\d+)\.htm</LookFor>
<SendTo>~/other.aspx?otherid=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
你可以尝试在config加上这种规则
那是由于系统放在IIS下的ent虚拟目录下
现在我放在iis根下面了
还是那个问题
如下所示:
http://localhost:8090/default.htm
找不到网页
正在查找的网页可能已被删除、重命名或暂时不可用。请尝试执行下列操作: * 如果是在“地址”栏中键入了网页地址,请检查其拼写是否正确。
* 打开 localhost:8090 主页,然后查找与所需信息相关的链接。
* 单击后退按钮尝试其他链接。HTTP 错误 404 - 找不到文件
Internet 信息服务技术信息(用于支持人员) * 详细信息:
Microsoft 支持
直接在IIS里,点击网页直接浏览,看看是否还是404
下面是完整的 web.config, 请各位大侠看看, 在IIS6/IIS7 + .net 2.0( C#) 的环境下, 有没有问题 <?xml version="1.0" encoding="gb2312"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<connectionStrings>
<add name="Conn" connectionString="App_data/#data.mdb" />
<add name="website" connectionString="麻雀工作室" />
<add name="cleanword" connectionString="00xx" />
<add name="upimagetype" connectionString=".gif|.jpg|.jpeg|.png" />
<add name="upimagesize" connectionString="250" />
<add name="skin" connectionString="free" />
</connectionStrings>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/default.htm</LookFor>
<SendTo>~/default.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/bbs.htm</LookFor>
<SendTo>~/bbs.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/notices.htm</LookFor>
<SendTo>~/notices.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/news-type-(\d+)\.htm</LookFor>
<SendTo>~/news-type.aspx?typeid=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/news-(\d+)\.htm</LookFor>
<SendTo>~/news.aspx?newsid=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/notice-(\d+)\.htm</LookFor>
<SendTo>~/notice.aspx?noticeid=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/product-type-(\d+)\.htm</LookFor>
<SendTo>~/product-type.aspx?typeid=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/product-(\d+)\.htm</LookFor>
<SendTo>~/product.aspx?productid=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/other-(\d+)\.htm</LookFor>
<SendTo>~/other.aspx?otherid=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<httpHandlers>
<add verb="*" path="*.htm" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
<compilation debug="true" defaultLanguage="c#" />
<authentication mode="Windows" />
<customErrors defaultRedirect="default.htm" mode="RemoteOnly" />
<globalization requestEncoding="gb2312" responseEncoding="gb2312" />
<pages validateRequest="false" autoEventWireup="false" />
<httpRuntime maxRequestLength="20480" executionTimeout="45" />
</system.web>
<appSettings>
<add key="FCKeditor:BasePath" value="~/FCKeditor/" />
</appSettings>
</configuration>
像这样的网页本身是不存在的,
是通过web.config中的地址转发转给对应的aspx进行处理动态生成的
尤其是关于*.htm转发的地方,
我不知道怎么改