0

I have a local ASP.NET web site written in VB.NET runing on W7. The default web page contains a simple style sheet which is loaded as follows

<link rel="stylesheet" href="dchs.css" type="text/css" media="screen" runat="server"></link>

The page is displayed without the above styling. The style sheet does exist as I can display it via the web browers as

file:///c:/inetpub/wwwroot/c1/dchs.css

but I cannot display it via the brower using

http://localhost/c1/dchs.css

This leads me to believe that IIS has some form of access problem to the C1 directory. It a similar way I can display a jpeg image via file://c1 bit not via localhost which gives an error message

The image "http://localhost/c1/menu.jpeg" cannot be displayed, because it contains errors.

8
  • share the errors. Commented Jan 19, 2017 at 12:45
  • Is your page also located in wwwroot\c1 ? Commented Jan 19, 2017 at 12:46
  • Yes all the scripts plus the css file and a couple of jpegs are all in the same file. All the rest of the aspx code runs fine. Commented Jan 19, 2017 at 12:49
  • @Muhammad Saqlain what do you mean by share the errors? Commented Jan 19, 2017 at 12:56
  • what error are you getting in browser console? Commented Jan 19, 2017 at 13:02

1 Answer 1

0

How you attached the .css file to your html project? where is it located?

Options:

1. Drag and drop your .css file to your html page.(Inside)

like this:

<link rel="Shortcut Icon" href="images/fil.ico" />

Make sure all folders and files are include when project deployed And a correct calling of id or class in your css of course.

Sign up to request clarification or add additional context in comments.

2 Comments

This is not a Visual Studio project. All the VB script code are in aspx files created via a text editor
Doesn't make sense, the important is you construct the code correctly according to your project path folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.