运行.Net3.5制作的网站时遇到问题? [英] Problem running a website made in .Net3.5?

查看:52
本文介绍了运行.Net3.5制作的网站时遇到问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,

我有一个用.Net3.5制作并配置为可在.Net2.0上运行的网站.

在注释了.Net2.0中不存在的程序集后,当我在.Net2.0中运行网站时,我获得了成功,并且能够加载第一页.但是,当我尝试在.Net3.5环境下运行同一网站时,在第57行中的web.config文件中出现错误:-

Dear Friends,

I have a website which is made in .Net3.5 and configured to run on .Net2.0.

When I ran the website in .Net2.0 after commenting the assemblies that were not present in .Net2.0, I got success and was able to load the first page. But when i tried to run the same website under .Net3.5 environment, I got an error in web.config file in line no 57 as:-

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. <br />

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.<br />

Source Error:

Line 55:             during development.
Line 56:         -->
Line 57:        <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="240">
Line 58:        </sessionState>
Line 59:        <httpRuntime maxRequestLength="20248" executionTimeout="800"/>




要在.Net3.5中顺利运行,必须在web.config文件或其他地方进行哪些更改?

谢谢

Varun Sareen




What has to be changed in web.config file OR somewhere else in order to run it smoothly in.Net3.5?

Thanks

Varun Sareen

推荐答案

通常,在应用程序根文件夹中有多个Web.Config文件时,会发生这种情况.
只需检查您是否有多个.如果是这样,请删除重复的副本.

阅读此处解决的类似问题: ASP.NET 2.0& "allowDefinition =" MachineToApplication"错误消息 [
Generally this happens when you have more than one Web.Config file in your application root folder.
Just check if you have more than one. If so, remove the duplicate copies.

Read a similar issue resolved here:ASP.NET 2.0 & "allowDefinition=''MachineToApplication''" error message[^]
Other useful link that has similar issue discussed: http://forums.asp.net/p/769696/769696.aspx


这篇关于运行.Net3.5制作的网站时遇到问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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