Showing posts with label problems. Show all posts
Showing posts with label problems. Show all posts

Tuesday, August 31, 2010

ImageButton Without A SRC Value Causes GET Request!

Situation:

Click submit on a submit button.
Page posts back with IsPostBack == true.
Browser shows page render.

Problem:

Server (in debug mode) shows another request perform, this time a GET, so IsPostBack == false.

Evidence:

An ImageButton was on the page with no SRC attribute at all. This caused the browser (so far happening in (Windows...) Chrome, Firefox and (MAC...) Safari to resolve the URL of the image, for the image button, to be the same as the page the button is sitting on. The request for this then causes a standard GET request to the page and IsPostBack becomes false again.

Solution:

Remove the image button or give it a valid src attribute url.

Result:

Happy developer.

Friday, July 02, 2010

Server Application Unavailable

I'm hoping that this post will one day come under the tag heading "problem solved" but for now it's going to be "problems."

This damn thing seems to crop up whenever you least expect it. There's multiple solutions, none guaranteed.

Essentially, the initial problem with be a message in big red letter which says "Server Application Unavailable"

This is basically a message from IIS saying you don't have permissions to see the proper error.

In my particular case, giving the directory hosting the web app full security permissions to the ASPNET user identity and dropping the IIS Virtual Directory (tab) Application Protection to Low allowed the true error to be seen.

This was: Could not load file or assembly 'System.Web.Extensions, Version=2.0.....' etc.

At the same time, the Event Viewer also started showing: Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache

I have also tried referencing the correct DLLs in the project references as I had tried to correct these links to the up-to-date DLLs, however they should have been pointing at a very specific location, brought in by SVN.

Ok, so the secret to this particular mess seems to have been "Make sure you're referencing the right DLLs."

Now the only problem is to solve the code issues in the controls!

Resources looked at so far include:

Friday, April 17, 2009

Workstation UnLock

For a long time now, I've been looking for a way to unlock a Windows computer programmatically. I'd like to be able to write a service, for example, which can unlock the machine and log in a user, rather than a session (which has no visible affect on the running screen), but simply logging back in the current user would suffice. Frankly, anything would do. There are many uses for this type of code, but my initial thrust was to develop a bluetooth app for my Windows Mobile device which would log me back into my machine when I walk back into range - a simple device detection app on the host machine; doesn't even have to communicate.

So far, I have been greeted with false starts, low-level C++ code (which, for me, never developed to full-fledged Windows coding) and basically tonnes of code which never claimed to work properly.

So, here I am going to log my efforts and record links to resources which might, probably won't, but might prove useful at some point: