在2003上运行asp.net,web.config文件是不是要做修改?
在2003上运行asp.net,web.config文件是不是要做修改?如果要改由该如何改呢?web.config代码如下:
--------------------------------------------------------------------
<?xml version="1.0"?>
<configuration>
<system.web>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to
false will improve runtime performance of this application.
Set compilation debug="true" to insert debugging symbols (.pdb information)
into the compiled page. Because this creates a larger file that executes
more slowly, you should set this value to true only when debugging and to
false at all other times. For more information, refer to the documentation about
debugging ASP.NET files.
-->
<compilation defaultLanguage="c#" debug="true">
<compilers>
<compiler language="c#" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" extension=".cs" compilerOptions="/d:DEBUG;TRACE"/>
</compilers>
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
Add <error> tags for each of the errors you want to handle.
"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommended for security purposes, so
that you do not display application detail information to remote clients.
-->
<!--
<customErrors mode="RemoteOnly"/>
-->
<customErrors mode="Off"/>
<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows",
"Forms", "Passport" and "None"
"None" No authentication is performed.
"Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
its settings for the application. Anonymous access must be disabled in IIS.
"Forms" You provide a custom form (Web page) for users to enter their credentials, and then
you authenticate them in your application. A user credential token is stored in a cookie.
"Passport" Authentication is performed via a centralized authentication service provided
by Microsoft that offers a single logon and core profile services for member sites.
-->
<authentication mode="Forms">
<forms name="VIP" loginUrl="Login.aspx" protection="All"></forms>
</authentication>
<!-- AUTHORIZATION
This section sets the authorization policies of the application. You can allow or deny access
to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
(unauthenticated) users.
-->
<authorization>
<allow users="*"/>
<!-- Allow all users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>
<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
-->
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>
<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify which requests belong to a particular session.
If cookies are not available, a session can be tracked by adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="true".
-->
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/>
<!-- GLOBALIZATION
This section sets the globalization settings of the application.
/
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;
/
-->
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
<xhtmlConformance mode="Legacy"/>
</system.web>
<appSettings>
<add key="ConnectionString" value="Data Source=(local);Initial Catalog=VIP;Persist Security Info=True;User ID=sa;Password=sa"/>
</appSettings>
</configuration>
--------------------------------------------------------------------
麻烦大家帮帮,很急呀!!!!!! --------------------编程问答-------------------- 不用
估计你用的是C#2.0 那么在机子上需要安装.net2.0才行
sf! --------------------编程问答-------------------- 不需要修改. 如果不能运行,可能需要修改 app.config --------------------编程问答-------------------- windows 2003上运行asp.net,web.config无特殊的配置,记得将网站绑定到.net framework2.0即可(对lz的应用而言)
--------------------编程问答-------------------- 不用做什么修改的呀
楼主用的是.net1.1吧
只要把虚拟目录属性中的asp.net标签页的.net framework选成1.1就可以了(如果你没有安装.net framework2.0 就不用选了,默认就是1.1) --------------------编程问答-------------------- 我以及绑定过了 --------------------编程问答-------------------- 我用的是2.0的
我把原先的1.0给卸掉了
--------------------编程问答-------------------- 大家可以看一下这个地址
221.130.178.219/login.aspx
--------------------编程问答-------------------- 服务器不可用
这个原因很多
看一下iis日志和事件查看器,是否有相关有用的信息 --------------------编程问答-------------------- 事件查看器:
error:failed to execute request because the app-domain could not be create.
--------------------编程问答-------------------- zt:
開啟ASP.NET 網站時,如果發生錯誤,經查看Web伺服器的「事件檢視器」中之「應用程式」,如果錯誤訊是:
Failed to execute request because the App-Domain could not be created. Error: 0x80131902
基本上,這個情況最可能發生在第一次執行 .Net framework 2.0 ,原因不明,但底下的做法大致可以解決此問題:
1.首先開啟「命令視窗」,並切換目錄到 %SystemRoot%\Microsoft.Net\Framework\ (%
SystemRoot% 視你 Windows 安裝目錄而定,一般是在 C:\Windows)
2.執行 "net stop w3svc" 終止 w3svc 服務
3.切換到下層目錄 v2.0.5.xxx
4.執行 "aspnet_regiis.exe -ua" 解除 .Net 安裝
5.重新安裝 .Net 到 IIS 中 "aspnet_regiis.exe -i"
6.重新啟動 w3svc "net start w3svc".
--------------------编程问答-------------------- 根据你的需求而来 --------------------编程问答-------------------- 1 win2003 自带了1.1的环境,如果是部署1.1的网站项目,不需要进行设置
2 如果网站是用2.0开发的话,需要先在win2003 上安装.net framework2.0,然后在IIS的管理器中右键该项目-属性-ASP.Net-Asp.Net版本选择为2.0 --------------------编程问答-------------------- 不行,还是这样
--------------------编程问答-------------------- 选过了,没有用阿 --------------------编程问答-------------------- 进入asp2.0目录
aspnet_regiis /i 重新注册映射iis
如果还不行的话,先停止一下应用程序池,然后打开.
--------------------编程问答-------------------- yan63(silence like a cancer grows)的方法我用过了没用。
你那个方法用完以后怎么.net2.0被禁止了,最后还是我有手动的方法去启动.net2.0的 --------------------编程问答-------------------- 什么叫进入asp2.0目录aspnet_regiis /i 重新注册映射iis
还有怎么停应用程序池阿
--------------------编程问答-------------------- cmd
cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
aspnet_regiis.exe /i
--------------------编程问答-------------------- .net framework 2.0的安装目录.
应用程序池在iis. --------------------编程问答-------------------- 同志们还是没用阿
--------------------编程问答-------------------- 怎到底怎么回事?我在2000上运行的好好的,一上传到空间服务器去就不行了,真是冤啊!比窦娥还冤! --------------------编程问答-------------------- 跟框架有关` --------------------编程问答-------------------- 不用修改,只需要在服务器上装.net framework 2.0,并且把站点目录设置为使用.net framework 2.0而非1.1就行了。 --------------------编程问答-------------------- 一般设置了iis用2.0,还要在iis中设置一个应用程序池对应您的网站!这种情况出现在服务器上安装了两个版本的.net frame.
不然一样会报错! --------------------编程问答-------------------- 重点:设置了iis用2.0,还要在iis中新建一个应用程序池对应您的网站 --------------------编程问答-------------------- 我用的就是win2003+asp.net1.1+asp.net2.0
好像没有问题呀,只有更改默认上传文件大小的时候才更改了一下 --------------------编程问答-------------------- up --------------------编程问答-------------------- 路过
补充:.NET技术 , ASP.NET