在实时服务器中托管WCF [英] hosting wcf in live server

查看:70
本文介绍了在实时服务器中托管WCF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一项WCF服务...

当我在本地IIS中托管时,这工作正常.

但是,当我将我的网络服务上传到实时服务器中时,出现了该错误

i have one WCF service ...

Which is working fine when i am hosting in my localhost IIS..

But when i uploaded my webservice in my live server its giving that error

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.

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.

Source Error:

Line 51:             ASP.NET to identify an incoming user. 
Line 52:         -->
Line 53:         <authentication mode="Windows" />
Line 54:         <!--
Line 55:             The <customErrors> section enables configuration 


Source File: D:\WWWRoot\tigererp.com\www\wcf_dateservice\web.config    Line: 53 



请帮助我....

谢谢...



Please Help Me....

Thanks...

推荐答案

要解决此问题,请删除IIS中的虚拟目录.然后,重新创建虚拟目录并将其配置为应用程序.要删除虚拟目录,请按照下列步骤操作:

*单击开始,然后单击控制面板.
*在控制面板"中,双击管理工具",然后双击"Internet信息服务".
*单击要配置的服务器的名称,然后双击网站".
*双击要配置的网站的名称.
*右键单击要删除的虚拟目录的名称,然后单击删除".单击是.

若要创建一个新的虚拟目录并将其配置为应用程序,请按照下列步骤操作:

*单击以选择要在其中添加新虚拟目录的网站的名称.
*在操作"菜单上,指向新建",然后单击虚拟目录".
*在虚拟目录创建向导"中,单击下一步".
*键入要创建的虚拟目录的名称,然后单击下一步".
*单击浏览,选择应用程序的目录,然后单击确定.
*单击下一步",然后单击完成".
To resolve this problem, remove the virtual directory in IIS. Then, re-create the virtual directory and configure it as an application. To remove the virtual directory, follow these steps:

* Click Start, and then click Control Panel.
* In Control Panel, double-click Administrative Tools, and then double-click Internet Information Services.
* Click the name of the server that you want to configure, and then double-click Web Sites.
* Double-click the name of the Web site that you want to configure.
* Right-click the name of the virtual directory that you want to remove, and then click Delete. Click Yes.

To create a new virtual directory and configure it as an application, follow these steps:

* Click to select the name of the Web site in which you want to add the new virtual directory.
* On the Action menu, point to New, and then click Virtual Directory.
* In the Virtual Directory Creation Wizard, click Next.
* Type the name of the virtual directory that you want to create, and then click Next.
* Click Browse, select the directory for the application, and then click OK.
* Click Next, and then click Finish.


根级web.config需要定义为:

Root level web.config needs to be defined as:

<location path="Admin">
<system.web>
<authorization>
<allow roles="administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>


这篇关于在实时服务器中托管WCF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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