如何在asp.net中添加Web服务 [英] How to add Web services in asp.net

查看:77
本文介绍了如何在asp.net中添加Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个Web服务但是如何在当前项目中添加Web服务?



错误在于添加时给出...给出如下





HTTP错误500.19 - 内部服务器错误

无法访问请求的页面,因为页面的相关配置数据是无效。

I have created a web services but how can add web services in current project ?

The error is giving while adding...given below


HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

推荐答案

检查此



[ ^ ]



希望它会有所帮助..
Check this

Calling Web Service using ASP.NET[^]

Hope it will help..


无法读取配置文件的原因是因为运行Web应用程序的进程无权访问文件/目录。因此,您需要为运行Web应用程序的进程提供这些权限。



访问权限应该相当简单,即至少读取,并且,取决于您的应用程序,也许写。



上面,你提到IUSR等不在web.config的属性中。如果你的意思是IUSR没有列在文件的安全选项卡中那么这是一件好事。一个人不想给IUSR任何web.config的权限。角色IUSR是一个匿名的互联网用户。



文件web.config只能通过你的应用程序访问。



请参阅以下链接,他们已经讨论过这个问题

[ ^ ]

内部服务器错误的请求的页面,不能待访问,因为,在相关的 [ ^ ]
The reason it cannot read the config file is because the process running your web app does not have permission to access the file/directory. So you need to give the process running your web app those permissions.

The access rights should be fairly straightforward, i.e. at least Read, and, depending on your app, maybe Write.

Above, you mention IUSR etc. not being in the properties for web.config. If by that you mean that IUSR is not listed in the security tab of the file then it's a good thing. One doesn't want to give IUSR any kind of permission to web.config. The role IUSR is an anonymous internet user.

The file web.config should only be accessible through your application.

See the following links, Where they have already discussed this matter
the-requested-page-cannot-be-accessed-because-the-related-configuration-data-for[^]
internal-server-error-the-requested-page-cannot-be-accessed-because-the-related[^]


这篇关于如何在asp.net中添加Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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