Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Images not showing and autopostback not working
mangelo
#1 Posted : Wednesday, March 7, 2007 6:14:43 AM(UTC)
Groups: Member
Joined: 3/7/2007(UTC)
Posts: 4

I just starting using Cassini on Vista today because IIS won't allow me to run / debug my app. The 2 things that aren't working so far is my images won't come up at all and drop down list boxes with autopostback set to true are not causing a submit / postback.

Please help

Mike.
Ultidev Team
#2 Posted : Wednesday, March 7, 2007 6:26:48 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Mike,

Issues you mention are not among the known Cassini problems. The most common cause for some HTTP requests to work in IIS and not in Cassini is the ASP.NET application assuming it's in a specific virtual folder (as it's often the case in IIS), instead of allowing for being located in the root of the web server as well (as with Cassini). However if you are sure this is not your problem (it may not be as Autopostback failing too), we would recommend using Fiddler to trace your requests to make sure they point to the correct URLs. Fiddler is very easy to use: just put it on the same box where you browser is and be sure to access your application using server's machine name or actual IP address instead of loop-back addresses like localhost or 127.0.0.1.

Please let us know if this information has helped.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
mangelo
#3 Posted : Wednesday, March 7, 2007 7:30:41 AM(UTC)
Groups: Member
Joined: 3/7/2007(UTC)
Posts: 4

What you had suggested did sound promissing. I made the project directory the same name as it was before (also the way way in VSS) because there were issues with that from IIS 6.x. I also tried running with my machine name in the URL. I am getting the same behavior. Images do not appear and postbacks from ddlbs are not work. Sometimes when I hit links or buttons it goes to a blank page.

Very strange stuff.
mangelo
#4 Posted : Wednesday, March 7, 2007 7:46:01 AM(UTC)
Groups: Member
Joined: 3/7/2007(UTC)
Posts: 4

Ok. Just a tad more progress. I updated the config for the new location using the Cassini web app and the postback problems are gone. Images still do not show. When I run with Visual Studio 2003 both problems still exist.

Mike.
Ultidev Team
#5 Posted : Wednesday, March 7, 2007 8:37:07 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Mike,

We are pretty sure now that using Fiddler you will be able to find the problem pretty quickly. It's still most likely to be requests for /virtualFolder/page.aspx where it should be /page.aspx that cause the issue. Fiddler will show your which URLs are requested and if some requests return 404 you'll be able to determine why.

Could you please clarify what do you mean by "with Visual Studio 2003 both problems still exist"? Visual Studio uses IIS, or Cassini if you have specified it as an external debugging application. But you also said neither of these two servers have the post-back issue.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
mangelo
#6 Posted : Wednesday, March 7, 2007 10:02:34 AM(UTC)
Groups: Member
Joined: 3/7/2007(UTC)
Posts: 4

I instaled Fiddler. I am not getting anything other than 200s. I can see the URL of the images. Rather than the entire URL for the image the server is only returning /Images/...

Also, when I try the ddlbs I get nothing at all in Fiddler.

When I run the site from the Cassini config page the ddlbs work, but the images still do not.

All of this works on XP machines with IIS.

Mike.

Ultidev Team
#7 Posted : Wednesday, March 7, 2007 10:13:59 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Mike,

Could you please select a session (a pair of a request and response) in Fiddler for one of the images that don't display. On the right side switch to the Session Inspector tab and check the bottom part of the right panel - the one with the Response data. There check Headers. What are the content-length values for responses? Also if you switch to Hex and Raw tabs, do you see data corresponding to images (it should be in Hex but not in Raw or TextView)?

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sbenedict
#8 Posted : Monday, April 16, 2007 11:10:06 AM(UTC)
Groups: Member
Joined: 4/16/2007(UTC)
Posts: 1

I was having a similar issue with my web app. The reason is that Cassini applies Authorization section rules to all resources by default - where as IIS ignores authorization rules for static files (such as images and style sheets) and WebResource.axd requests. In my web.config's Authorization section I was disabling access to the entire application by anonymous users (deny users="?").

To work around the issue, I allowed anonymous access to the entire application by changing the 'global' authorization to (allow users="*"). Then I restricted accces to individual folders and pages that I did not want anonymous users to see using "location" sections with specific authorization setup to deny them access.

An example of the Location section for my homepage is:

Code:
<location path="Default.aspx">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>


Hope this helps,

-- Sam
Ultidev Team
#9 Posted : Monday, April 16, 2007 11:41:46 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Thank you for the contribution, Sam.

This is the extension of the IHttpModule application difference between IIS default setup and UltiDev Cassini.

You are right, UltiDev Cassini applies forms auth to all resources, not only to ASPX and ASMX. The reason for that is that in Cassini all registered IHttpModule derivatives (and forms auth is just one of them) get a chance to handle every requests that comes through, regardless whether the request is for ASPX or for a generic resource, like JPEG. In IIS default settings ensure that only native ASP.NET resources are handled by ASP.NET ISAPI - the rest, like JPEGs, CSS, etc. are handled by IIS itself. This approach, while it yields better performance, has also its drawbacks, like "404 not found" error for .ASPX are handled by your code, and 404s for JPEGs are handled by IIS, returning potentially inconsistent error pages between the two. To eliminate this gap many developers and Ops configure IIS to pass all requests through ASP.NET filter. If they do that, you are likely to see exactly the same issue you see with Cassini.

The bottom line, Sam, is configuring authentication the way you did it will not only make it working for Cassini, but will also make it work for IIS when all requests are configured to go through ASP.NET ISAPI.

(We are sorry if this explanation is a bit convoluted - it's a pretty advanced topic and it's kind of hard to lay it out in a few sentences).

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.