Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

asp.net login configuation

I'm totally confused. I used the asp.net configuration to set up users and passwords. It works correctly in visual studio but when I transferred it on a server it didn't work. The IT assistant said that there were no users names and passwords in the config file. I've looked this up on the web and in this website and didn't understand anything I saw. Do I add the users and passwords in this config file? Why do they have a asp.net configuration set up if you have to write code anyway? I only need 2 users and passwords to get into one folder with 2 files in it. What's the best way to go about this? Right now I have 2 users with password that have the roles admin.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.web>
        <authorization>
            <allow roles="admin" />
            <deny users="*" />
        </authorization>
    </system.web>
</configuration>

Open in new window

0
designaire
Asked:
designaire
  • 7
  • 5
1 Solution
 
GiftsonDJohnCommented:
Hi,

According to your configuration only the users with role admin will have access to your site. Have you copied the ASPNETDB.MDB from app_data folder to the web server? This is where the users and roles details will be saved.
0
 
designaireAuthor Commented:
Yes, I get the login but nothing happens when I try to login. The guy at the  hosting service acted like I should have the user names in the config file. Maybe I should set it up again and transfer it again.
0
 
GiftsonDJohnCommented:
The configuration is based on the Application name what you have created on the client. If you have changed your application name while deploying into the server then you have to reconfigure the application configuration.

Try this. Open Aspnetdb.mdb in Visual Studio Server Explorer and open and see the table aspnet_Applications what value it has.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
GiftsonDJohnCommented:
User names in the web.config file is not required. It will be configured inside ASPNETDB.MDB file along with the role
0
 
designaireAuthor Commented:
I have ASPNETDB.MDF with aspnetdb_log.ldf ...is that correct? I can go into tables and aspnet_applications but I don't know what I'm looking for.

When I log-in to the page it says the server www.domainname.com requires a username and password. Is that from the authentication I set up or is it from the web server?
0
 
GiftsonDJohnCommented:
It is correct.

No. it seems like permission settings are not correct in the file system. Check the security settings in the web server folders (probaby inside C:\Inetpub\wwwroot).
0
 
designaireAuthor Commented:
Do you mean my hard drive or the server of the hosting company? I can't find the Inetpub\wwwroot. I just did a search. I'm using Visual Studio but I guess you know that.
0
 
designaireAuthor Commented:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration.  Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server.  Contact the Web server's administrator for additional assistance.
0
 
GiftsonDJohnCommented:
Yes. on the webserver, the security settings on the files might not be correct. If any misleading with Asp.Net configuration it will say "Access Denied" message clearly. If it prompts for user name and password then definitely the problem is with the web server end.

What happends if you cancel out of authentication dialog. Is it saying "Access Denied due to invalid server configurations?" IIS message or Asp.Net error message
0
 
GiftsonDJohnCommented:
Yes. it is correct. The problem is with Server file system security credentials. Need to set the security credentials accordingly
0
 
designaireAuthor Commented:
What should I ask them to do?  I'll have to call tomorrow. I already called and he said I didn't have the users and password in the config file. Maybe I'll get somebody else when I call.
0
 
GiftsonDJohnCommented:
Ask them to check the file system and the credentials (Security credentials) of the files in it. The Worker Process should be capable of accessing the file and process it. In the current scenario the credentials used for worker process is not able to access the file. So it prompts for the user name which has access to it.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now