Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
需要帮助设置ASP.net 3.5(屏幕截图)_Asp.net_Iis 7_Windows 7_Installation - Fatal编程技术网

需要帮助设置ASP.net 3.5(屏幕截图)

需要帮助设置ASP.net 3.5(屏幕截图),asp.net,iis-7,windows-7,installation,Asp.net,Iis 7,Windows 7,Installation,这让我发疯了,已经困扰了我好几个星期了,我今天正试图解决这一切,但我遇到了真正的困难,如果有人能帮助我,这对我来说将是一个巨大的好处 我正在尝试在一台电脑上开发一个网站,在我的家用电脑上工作。这台旧计算机运行的是ASP.NET3.5 在我的新计算机上,安装IIS和ASP.net 3.5后: 我得到以下错误: 检查应用程序池后,它会说它正在运行ASP.net 2.0: 也没有将其更改为3.5的选项: 我已经检查了已安装的.net版本的regedit,其中列出了已安装的3.5。我似乎无法让我

这让我发疯了,已经困扰了我好几个星期了,我今天正试图解决这一切,但我遇到了真正的困难,如果有人能帮助我,这对我来说将是一个巨大的好处

我正在尝试在一台电脑上开发一个网站,在我的家用电脑上工作。这台旧计算机运行的是ASP.NET3.5

在我的新计算机上,安装IIS和ASP.net 3.5后:

我得到以下错误:

检查应用程序池后,它会说它正在运行ASP.net 2.0:

也没有将其更改为3.5的选项:

我已经检查了已安装的.net版本的regedit,其中列出了已安装的3.5。我似乎无法让我的网站运行3.5版本,或者在没有任何奇怪的IIS错误消息的情况下运行

这条线索:表明2.0显示是正确的,我的问题是为什么网站没有运行

这是我的web.config文件:

    <?xml version="1.0"?>
<configuration>

    <configSections>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                </sectionGroup>
            </sectionGroup>
        </sectionGroup>
    </configSections>
    <appSettings/>

    <connectionStrings>
        <remove name="LocalSqlServer" />
        <add name="LocalSqlServer" connectionString="Server=SERVER1\DEVSERVER; Database=alphaPack; User Id=sa; password=sa"
            providerName="System.Data.SqlClient" />
    </connectionStrings>

    <system.net>
        <mailSettings>
            <smtp>
                <network
                     host="localhost"
                     port="25"
                     userName="sa"
                     password="sa" />
            </smtp>
        </mailSettings>
    </system.net>

    <system.web>
        <machineKey validationKey="A03751058172F4F941C2120C891C57DA2170AAD76437D8D0D48FF84BAA1ED4A8EB023F96D2164B29080F7B5FD8F86F7F9398DB841C04034B1A464155DDA72BB6" decryptionKey="B65A7A473D2F7343635B59D3A9475A2BB446B3DC21848FCA26313FA24411F516" validation="SHA1" decryption="AES" />
        <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
        <roleManager enabled="true" />
  <compilation debug="true" defaultLanguage="c#">
      <assemblies>
          <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
          <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
          <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
  </compilation>
        <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
        <authentication mode="Forms" />
        <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
        <customErrors mode="Off"/>
        <pages>
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </controls>
        </pages>
        <httpHandlers>
            <remove verb="*" path="*.asmx"/>
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
        </httpHandlers>
        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </httpModules>

            <!-- Profile Fields -->
            <profile>
                <properties>
                    <add name="IsSubscribed" type="System.Boolean" defaultValue="false" />
                    <add name="workNumber" type="System.String" defaultValue="" />
                    <add name="homeNumber" type="System.String" defaultValue="" />
                    <add name="mobileNumber" type="System.String" defaultValue="" />
                    <add name="title" type="System.String" defaultValue="" />
                    <add name="firstName" type="System.String" defaultValue="" />
                    <add name="surname" type="System.String" defaultValue=""  />

                </properties>
            </profile>

    </system.web>
    <system.codedom>
        <compilers>
            <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="WarnAsError" value="false"/>
            </compiler>
        </compilers>
    </system.codedom>
    <!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules>
            <remove name="ScriptModule"/>
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </modules>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory"/>
            <remove name="ScriptHandlerFactoryAppServices"/>
            <remove name="ScriptResource"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </handlers>
    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>

</configuration>


非常感谢您的帮助,当我可以的时候,我会给您丰厚的奖励。

如果您在.NET framework之后安装了IIS,请尝试framework 3.5中的aspnet_regiis


顺便说一下,由于某种原因,我看不到您的图像(我在防火墙后面)

.config
文件旁边的目录中有什么?您的所有网站页面/资源是否都位于此文件下面的目录中?站点的物理路径比
.config
的位置靠下一个目录,或者看起来是这样,这可能是一个问题。

对于3.5,没有.NET Framework版本,3.5只是运行在.NET Framework 2.0上的库的集合,所以您得到的是正确的


“C:\Projects\AlphaPack\AlphaPack”是否在IIS中设置为应用程序?
配置元素只能在应用程序的根web.config中设置,因此我猜您只是将目录设置为虚拟目录,而不是应用程序。

web.config有效吗?它可以在其他服务器上正常工作,我要复制文件吗?另一台服务器是否使用相同版本的IIS?我建议您阅读Scott Hanselsman的以下内容。谢谢,图像由托管,因此它们应该显示,请尝试刷新它们!我应该向aspnet\u传递什么参数来注册它?我需要浏览到一个目录才能正常运行吗?打开cmd,浏览到C:\Windows\Microsoft.NET\Framework\v2.0.50727,然后运行“aspnet\u regiis/I”。我不确定它是否会工作,但值得一试,因为它是无害的,如果已经安装。WOWOWOWOWO omg x 999999999它的工作原理:D wtf我不知道如何,但它的工作原理非常感谢!Web.config与default.aspx以及所有其他页面一起位于一起您确定吗?该图像说明配置文件=\c:\projects\alphapack\alphapack\web.Config,站点物理路径=c:\projects\alphapack\alphapack\alphapack。我现在已将其作为应用程序安装,请求URL物理路径c:\projects\alphapack\alphapack\default.aspx配置文件\\?\c:\projects\alphapack\alphapack\web.Config,现在一切都正确了吗?我现在已将其设置为应用程序,但收到与C:\Windows\System32\inetsrv\config\ApplicationHost.config相关的相同错误消息。如果有帮助,我已添加到ApplicationHost.config的链接