Dev Team Assemble

Evil beware!
Add to Technorati Favorites

Archive

Category: IIS

So I was having a strange problem in SharePoint the other day trying to run a webservice from a client script.  Every time I called the service (in this case and .asmx in the layouts dir) it was doing nothing...no communication at all with the service.  What made this particularly strange is that this exact same setup was working fine for everyone else in my team...figures.

When I ran the web methods from the service page itself (which loaded just fine) I got the following error : Request format is unrecognized for URL unexpectedly ending in '/[webmethod_name]'. Didn't make sense...I checked my web configuration and compared it against the other people in my team and all was well.  I tried following Microsoft's recommendation of adding the following snippet to the system.web section of the config file.

<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>

All the above did was give me a 500 error.

After spending waaaaaaaaay to much time on the problem...a colleague of mine and I finally discovered that it was due to the Lower case rewrite inbound rule (converts the entire address to lower case).  Apparently webmethod names are case sensitive in the address bar (this was not a SharePoint problem)...the documentation is here on msdn:  http://msdn.microsoft.com/en-us/library/0c515353(VS.71).aspx

So turning off the rule and everything started to work again.

Technorati Tags: , ,

I started getting this error recently on my development box after I started using WSP Builder.  I really like this program but I was a little put off by this error.  Obvisouly it is recycling  the worker process or something along those lines (too lazy to look it up).  I am fine with it when it comes back online after a few seconds but I was having instances where it was hanging there...stuck in 503 limbo. 

Turns out the problem is the application pool is stuck in a stopped state and the fix is simply enough to restart it.

Technorati Tags: , , ,

I came across this neat tool (well a colleague of mine did and told me about it) from Helicon called URL Rewriter. Basically it allows you to use an ISAPI filter to rewrite the url that the server uses to work with in IIS and is essentially a copy of the mod_rewrite utility available in Apache.

It uses Regular expressions...so if you are not an expert in those (as I am clearly not) then this little tidbit of code may help. It allows you to rewrite the url that comes in as subdomain.domain.com as domain.com/subdomain. The top portion is the header and sets up logging and such...the real meat is the last two lines.

Here it is

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.48
RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 200
RewriteBase
ReWriteLog C:\rewrite.log
RewriteLogLevel 9

RewriteCond %{HTTP_HOST} ^(?!www)(\w+).christiedigital\.com
RewriteRule (.*) /%1/$1 [L]

Hope this helps

Technorati Tags: , , , ,

This is kind of of a weird error and it didn't make sense to me at first (still doesn't really). The best workaround I could find on the net was to temporarily change the application to run in the application pool of the central admin site.

Steps:

  1. Change the AppPool for the app to be the same as the Central Admin site (Home Directory tab in IIS website properties).
  2. Reset IIS or at the very least do an %systemroot%\system32\iisapp.vbs /a "apppoolname" /r (not sure if the iisapp.vbs method will work but cant see why not).
  3. Activate the publishing infrastructure.
  4. Set the app pool back to normal.
  5. repeat step 2.

Enjoy!

Technorati Tags: , , ,