views:

63

answers:

1

Hello, im building a asp.net web site with 2.0 framework. I've been "fighting" with web.config, i've changed it quiet some times. So to start from scracht this is what i have:

<?xml version="1.0" encoding="utf-16"?>
<configuration>
 <connectionStrings>
  <remove name="LocalSqlServer"/>
  <add name="ABC" connectionString="Database=jsilvaqqc.mdf; Data Source=*****;Initial Catalog=jsilvaqqc;User ID=****;Password=*****;" providerName="System.Data.SqlClient"/>
    <add name="LocalSqlServer" connectionString="Database=jsilvaqqc.mdf; Data Source=*****;Initial Catalog=jsilvaqqc;User ID=*****;Password=*****;" providerName="System.Data.SqlClient"/>
 </connectionStrings>

  <location path="Members">
  <system.web>
   <authorization>
    <allow users="*"/>
        <deny users="?"/>
   </authorization>
  </system.web>
 </location>
 <system.web>
<compilation debug="true"/>
  </system.web></configuration>

It works fine im my machine. I've created the users for the login and the role to access the "Members" folder.

But in my host company, it doesnt work. I have the aspnet database from my computer in that databese "jsilvaqqc.mdf". When i try to log on pops up box requiring autentication. But i've alreadu given that in the log in form. Do i need aspnet "authentication" tag? Why dont i need it in my machine if i access the same database?

Here is the print of the box that comes up, when i log. And only when i log with a valid user.

Link: http://www.freeimagehosting.net/image.php?c9425ff727.jpg Thanks for you help.

+2  A: 

It sounds like the pop-up login box you talk about is probably IIS asking for Windows Authentication. If you only want to use forms authentication, change the permissions on the Virtual Directory in IIS to allow anonymous access.

starskythehutch
+1, Also ensure the IUSR_<machinename> account has read permissions to all the files.
David
i don't mind adding windows authentication, if it fix the problem. I dont have permissions to touch in the IIS of the host company.How to add windows authentication?
Catarrunas
Windows Authentication is already on, which is why you are getting the login box. To remove it you need to configure anonymous access on IIS.Note:- My solution is based upon the assumption that it is the Windows Authentication log in box you are referring to.
starskythehutch
I've added the image of the box that appears.
Catarrunas
You're ritgth all that i had to do was add "<authentication mode="Forms"/>"Thanks
Catarrunas