使用iis托管网站 [英] host a website using iis

查看:64
本文介绍了使用iis托管网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经制作了一个ASP.net网站,该网站由视觉工作室通过PRESSING F5运行。我已将项目文件夹保存在

C:\inetpub \wwwroot

为C:\inetpub \wwwroot \ DashBoard



C:\inetpub \ www.root \DashBoard目录中的文件夹是



DashBoard //目录

DashBoard_BusinessLogic //一个目录

DashBoard_DataLayer //一个目录

DashBoard.sln

web.config





每个目录里面

C:\inetpub \ www.root \ DashBoard \ DashBoard

C:\inetpub \wwwroot \ DashBoard \DashBoard_BusinessLogic

C:\inetpub \wwwroot \ DashBoard \DashBoard_DataLayer



是.aspx,aspx.cs,.aspx.cs.designer.cs文件。



以上3个目录在visual studio解决方案。





default.aspx文件位于以下目录中。

C: \ n \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ />


我首先尝试使用地址在服务器本身运行它

http:// localhost



步骤1.我已将应用程序池设置为Classic.Net AppPool

步骤2.我已将物理路径设置为C:\inetpub \wwwroot \ DashBoard 。

步骤3.我已启用目录浏览。

步骤4.在浏览器中键入localhost。





它列出了里面的目录

C:\inetpub \wwwroot \ DashBoard。



当我点击第一个目录时,会显示以下内容。







I have made a ASP.net website which is running in visual studio by PRESSING F5. I have saved my project folder in
C:\inetpub\wwwroot
as C:\inetpub\wwwroot\DashBoard

The folders inside the C:\inetpub\wwwroot\DashBoard directory are

DashBoard //a directory
DashBoard_BusinessLogic //a directory
DashBoard_DataLayer //a directory
DashBoard.sln
web.config


Inside each directory
C:\inetpub\wwwroot\DashBoard\DashBoard
C:\inetpub\wwwroot\DashBoard\DashBoard_BusinessLogic
C:\inetpub\wwwroot\DashBoard\DashBoard_DataLayer

are the .aspx, aspx.cs, .aspx.cs.designer.cs files.

The above 3 directories are referenced to each other in the visual studio solution.


The default.aspx file is in the below directory.
C:\inetpub\wwwroot\DashBoard\DashBoard


Now I want to run the website using IIS7 on Windows 7.

I am first trying to run it in the server itself using the adress
http://localhost

Step 1. I have set the application pool as Classic.Net AppPool
Step 2. I have set the physical path to C:\inetpub\wwwroot\DashBoard.
Step 3. I have enable directory browsing.
Step 4. typed localhost in the browser.


It lists the directories inside
C:\inetpub\wwwroot\DashBoard.

When I click on the first directory, the following is displayed.



Parser Error Message: Could not load type 'DashBoard.Login'.

Source Error:


Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DashBoard.Login" %>
Line 2:
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: /DashBoard/default.aspx    Line: 1









有人可以帮忙吗?

我不想要目录列表但是想在目录中打开页面default.aspx

C:\inetpub \ www.root \DashBoard \ DashBoard当我进入localh ost在浏览器中。



如果我禁用目录浏览,则显示的错误表示启用目录浏览。



如果我将物理路径设置为C:\inetpub \ www.root \DashBoard \ DashBoard,则出现以下错误。









Can anyone help?
I do not want directory listing but want to open the page default.aspx in the directory
C:\inetpub\wwwroot\DashBoard\DashBoard when I enter localhost in the browser.

If I disable directory browsing, the error displayed says to enable directory browsing.

If I set the physical path to C:\inetpub\wwwroot\DashBoard\DashBoard the following error comes.


Parser Error Message: Could not load file or assembly 'DashBoard' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Source Error:


Line 57:                 <add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 58:                 <add assembly="System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 59:                 <add assembly="*"/>
Line 60:                 <add assembly="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
Line 61:                 <add assembly="System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>

Source File: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config\web.config    Line: 59

Assembly Load Trace: The following information can be helpful to determine why the assembly 'DashBoard' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

推荐答案

这是由于 .NET目标框架版本,请检查这些

此程序集由比当前加载的运行时更新的运行时构建,无法加载 [ ^ ]

如何修复无法加载文件或程序集'Newtonsoft.Json'或其中一个depende ncies。这个程序集是由比当前加载的运行时更新的运行时构建的,无法加载。 [ ^ ]
It's due to .NET target framework version, check these
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded[^]
How to fix "Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded." [^]


这篇关于使用iis托管网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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