Cannot display images

E

egsdar

Yesterday everytime i hit on "view in browser.." it displays fine the images,
but today in the morning can't do it.
How can i solve this, tomorrow i have to do a presentation, so i really
appreciate your help.
 
G

George

Eat more.. So you get stronger and hit "view in browser" stronger.
I had the same problem when i was 5. I ate and ate and now i am 36 and no
problem with hitting "view in browser" Works from first time always...


George.
 
G

George

Well, I completely did not understand your problem in your first post so I
gave you a funny answer.
But since you've followed up :)

Here is my guess what is wrong with your code (at least what is wrong with
the code on this page
http://www.codeproject.com/KB/session/NoCookieSessionLogin.aspx

If you are not using IIS and using bult in WebServer in Visual Studio then
..NET handles everything. Even ouput of the images.
Hence this code
Sub Application_OnPostRequestHandlerExecute()
CheckLoggedIn()
End Sub

will run and redirect to ~/Login/Login.aspx even requests like
http://localhost:12323/my.gif
which is why you do not see images.

Sollution is easy. Add the check that request URL is .aspx

Sub Application_OnPostRequestHandlerExecute()
CheckLoggedIn()
End Sub

something like this.

Sub Application_OnPostRequestHandlerExecute()

if (HttpContext.Current.Request.Path.ToLower().Substring(sPath.Length - 5)
<> ".aspx")
return;
CheckLoggedIn()
End Sub

George.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top