Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS security settings and configuration for asp.net

Status
Not open for further replies.

patrickdrd

Programmer
Nov 21, 2003
149
GR
Hi everyone!

I am developing a (relatively small) asp.net site
for my company, however I am experiencing some problems with iis and asp.net security settings along the way.

For a example, I was getting an "access denied" message on an assemply that I had build myself, when trying to run the project that was referencing it.
I figured out that I had to give permissions to the aspnet user (I gave him full permissions under the project's path).

Now, I have another problem: when the user tries to load a page that includes a graphic (an image file), a logon window pops up!
I do not know why this is happening, the strange thing is that when he clicks on cancel (not logging on actually), the page continues to load, without the image!

What are the particular settings one has to keep in mind on when developing sites under iis?

Is there any reference for those?

Thanks in advance!
 
Sometimes that happens - sometimes I've figured out why, sometimes I haven't!

What's probably happened is that the image in question hasn't got the relevant security permissions set (for example, if it's been copied from somewhere it may not get the same security permissions applied). The easiest solution is normally to set the permissions on the folder the image is for the ASPNET account again, and go to the advanced security settings and make sure that the settings are cascaded down to all files and subfolders.




____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
if you build a project and add say an image to the folder on IIS your permissions will NOT carry over and have to be added manually for that image. give ASPNET and users access to that image or image folder.

 
You were right guys,
that image did not have the aspnet permissions,
so I gave it the permissions,
but one of the (displayed on the home page)
refuses to display without requesting to logon,
however it displays when I run the app locally (localhost)!

Anyone knowing the reason?

Thanks in advance!
 
oops, I did not notice users, sorry...

What permissions should I give to users and aspnet to that folder? Only read?
 
and something else:

is there a way to accomplish this using a batch file?
 
just give users the default..same as ASPNET. and your asking to add users via a batch file? you can use VB script to modify AD users and there access..I have some scripts but would have to dig them out.

 
I found that (at last)!
Regarding that last image that was refusing to display,
my path was wrong (absolute path (C:\inetpub\
Thanks for your answers guys!
 
same problem again (on another pc),
gave full permissions to asp.net, isur_xxx & iwam_xxx users
(even gave to everyone full permissions as a last resort),
but the @&*%#%(*^ images refuse to display!

(The images are loaded using css, e.g.:
.inpNavFirst {
background-position: center;
float: none;
vertical-align: baseline;
background-repeat: no-repeat;
text-align: center;
background-image: url("./Images/navigate_left2.gif");
width: 1.8em;
height: 1.8em;
}

and:
<input id="btnFirst1" tabindex="7" type="button" name="btnFirst1" runat="server" class="inpNavFirst" >
),
but I guess that this should not be a problem, because they display properly on the other pc
(both Windows XP SP2)
 
try changing url("./Images/navigate_left2.gif")
to

url("./Images\navigate_left2.gif")

 
I created a test web application on asp.net
and used the simplest format:

<INPUT style="Z-INDEX: 102; LEFT: 96px; BACKGROUND-IMAGE: url(file:///C:\Inetpub\ BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 184px" type="button" value="Button">

(picked the image using browse button)

the image was showing in the designer, but not in runtime!

What could be wrong?
 
Another difference is that on the pc that it's working the resolution is set to more than 1024x768 which is on the other two pc's that it's not working.

The working PC has a 19 inches screen, while the other two 17 inches
 
Soled that finally, after adding: background-color
to my class (css)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top