首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

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

2012-02-14 
webform程序打开服务器上excle文件,IE提示输入用户名密码,如何解决?webform程序打开服务器上excle文件,老

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"
...
passwordStrengthRegularExpression=""/> 

 If you are using a nondefault database You can change the connectionStringName parameter assignment in the uncommented lines to a value other than LocalSqlServer if you modified the connection string in the machine.config file, or if you added a connection string in the application web.config file. For example, if you named a connection string as MySqlServer, you should change the connectionStringName parameter value to MySqlServer.

Make sure that the appropriate user or user group (ASPNET for IIS 5, IIS_WPG for IIS 6, or IIS_IUSRS for IIS 7) has write authority for the virtual root directory of your deployed Web Forms application.

The next step in this procedure creates the App_Data directory and saves database files to this directory. However, it cannot do this if the ASPNET user (Windows XP), the IIS_WPG user group (Windows 2003), or the IIS_IUSRS user group (Windows Vista) does not have write authority for the Web Forms virtual root directory. 

If you proceed to the next step without modifying write permissions, you might get an error page indicating that you do not have write authority for this directory. The error page also explains how to grant write authority for the directory.

Open the UsersInit.aspx file for the Web Forms application in a Web browser.

The full URL for this file is typically http://ServerName/ApplicationName/UsersInit.aspx. When you open this file in a Web browser, the App_Data directory is created under the application virtual root directory and the permanent accounts database is created with the following entries:



User name Password Role 
admin a123456& admin 
user a123456& user 

The UsersInit.aspx returns a success page after the above user accounts are created.

 Delete the UsersInit.aspx file after this step For security reasons, you should delete the UsersInit.aspx file after you go to the next step or complete this procedure.

Open the Login.aspx file for the Web Forms application in a Web browser. 

The full URL for this file is typically http://ServerName/ApplicationName/Login.aspx. The Login page displays.

On the Login page, enter admin for the User Name and a123456& for the Password.

The Welcome page for an administrator role has a hyperlink labeled Users that opens a page to manage users.

Click the Users hyperlink, then click the Search button in the page to manage users.

The page for managing users displays the application users in the permanent user database.




Click the Create New User hyperlink.

The page for adding users displays.

Enter a new user name, password, and e-mail. Enter the password a second time in the Confirm Password text box and click Create User.

A new user account is added to the database for the current Web Forms application. 

Select the Admin Role check box if the new user should have administrative privileges, and click Finish.

When you return to the page for managing users and click the Search button again, you should see the user account you created in the list of user accounts.

Repeat steps 10-12 to create as many user accounts as necessary, then click the Logout hyperlink to log out from the user management role.

 If you redeploy Accounts that you create are maintained in the database after you redeploy the Web Forms application, but you must edit the web.config file as described in step 4 above after each redeployment.

热点排行