当前位置: 代码迷 >> PB >> webform程序打开服务器下excle文件,IE提示输入用户名密码,怎么解决
  详细解决方案

webform程序打开服务器下excle文件,IE提示输入用户名密码,怎么解决

热度:86   发布时间:2016-04-29 07:45:17.0
webform程序打开服务器上excle文件,IE提示输入用户名密码,如何解决?
webform程序打开服务器上excle文件,老是弹出输入用户名,密码的提示框,输入服务器的用户名密码才可以正常打开,服务器已经开启了guest用户,并且允许匿名登录的,求教大家了!!
------解决方案--------------------
不是guest,而是ASPNET (IIS 5.0), IIS_WPG (IIS 6.0), or IIS_IUSRS (IIS 7.0) 
要有相应目录的完全控制权限,顺便说下,你不能用windows的简单共享
------解决方案--------------------
Creating permanent user accounts
Permanent user accounts are disabled by default. After a Web Forms application is successfully deployed, the IIS server administrator can use the following procedure to set up permanent user accounts. This procedure uses the default ASP.NET membership provider and data source assignment, although a note in the procedure describes a required change to the web.config file when you use a nondefault connection string.

 To create permanent user accounts:

Run aspnet_regsql from a DOS command prompt window. 

This starts the ASP.NET SQL Server Setup wizard. 

You can enter Aspnet_regsql /? at the command line to obtain a list of optional parameters for SQL Server or SQL Server Express that you can use to bypass the wizard. If you are using a local SQL Server database, for example, you can enter aspnet_regsql -S (local) -E -A m, where -S (local) indicates that the server is local, -E indicates that the connection uses Windows Authentication, and -A m adds the membership feature.

Use the ASP.NET SQL Server Setup wizard to create the user database.

In the wizard, you can enter .\SQLEXPRESS as the server name. This is the default name for the local server as defined in the machine.config file. The wizard should give you a success message.

In a text editor, modify the web.config file in the virtual root directory for your deployed Web Forms application (typically, C:\Inetpub\wwwroot\applicationName) to remove comment tags (<!-- and -->) from the following lines: 


 <!-- <roleManager enabled="true" /> -->
    ...
            <!-- <add name="AspNetSqlMembershipProvider"
            ...
            passwordStrengthRegularExpression=""/> -->

These lines should now appear in the web.config file as: 


 <roleManager enabled="true" />
    ...
            <add name="AspNetSqlMembershipProvider"
  相关解决方案