PANVEGA’s Blog

DotNet Development, SharePoint Customizing, Silverlight, MS Infrastructure and other tips and tricks

Posts Tagged ‘IIS’

Problems when deploying a FeatureReceiver dll in the ISS bin folder

Posted by PANVEGA on October 28, 2008

I could not deploy a SPFeatureReceiver dll  assembly  via the WebApplication instead of the GAC. I correctly used the Assembly Location=”MyDllName” DeploymentTarget=”WebApplication” /> line in my manifest and had the dll in the root of the solution file. However it was still unable to load the event receiver assembly and the dll did not deploy. Read the rest of this entry »

Posted in Deployment, Event Receivers, IIS, MOSS | Tagged: , , , | Leave a Comment »

Updating Files after IIS Application Pool Recycling

Posted by PANVEGA on October 21, 2008

Problematic

Sometimes you have to update some files in you SharePoint 12 Folder. However it is not always possible updating files while someone access the application file. You can only access via read permission.

I have a custom webpart that accesses some XML files. However the XMLs should be updated via Webservice once a day.

Read the rest of this entry »

Posted in Administration, IIS, Infrastructure, MOSS, WebParts | Tagged: , , , , | Leave a Comment »

IIS HTTP Compression

Posted by PANVEGA on September 22, 2008

There’s a finite amount of bandwidth on most Internet connections, and anything administrators can do to speed up the process is worthwhile. One way to do this is via HTTP compression, a capability built into both browsers and servers that can dramatically improve site performance by reducing the amount of time required to transfer data between the server and the client. The principles are nothing new — the data is simply compressed. What is unique is that compression is done on the fly, straight from the server to the client, and often without users knowing.

In the day of IIS5 and earlier the compression built into IIS had various issues and was really not worth implementing. To enable compression you would need to go with a 3rd party solution like http://www.port80software.com or http://www.xcompress.com. This has all changed in IIS6!

Read the rest of this entry »

Posted in IIS, Infrastructure, MOSS, Uncategorized | Tagged: , | Leave a Comment »

IIS Redirection for SharePoint Sites

Posted by PANVEGA on November 30, -0001

I (of our SPS instance) wanted to redirect an old list to a new list. I did not want to create a code-based solution (e.g. an aspx page, et al) and with the friendly “Apache could do this”. I decided to see if IIS would handle it.

Introductions:

When a browser requests a page or program on your Web site, the Web server locates the page identified by the URL and returns it to the browser.

When you move a page on your Web site, you can’t always correct all of the links that refer to the old URL of the page. To make sure that browsers can find the page at the new URL, you can instruct the Web server to redirect the browser to the new URL.

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures.

You can redirect requests for files in one directory to a different directory, to a different Web site, or to another file in a different directory. When the browser requests the file at the original URL, the Web server instructs the browser to request the page by using the new URL.

SharePoint URLs can get long and unmanageable and admins want URLs that their users can remember. They want to use something like http://sharepoint forward to http://sharepoint/_layouts/authenticate.aspx

To do this kind of redirection I use IIS directly, I don’t get SharePoint involved at all. Create a new virtual server in IIS Manager and give it a descriptive name like “Software Redirect.” When you’re walking through the wizard you’ll take the defaults. You’ll have to point it to a local directory. This is only temporary, so you can point it anywhere. After the virtual server is created, edit the properties. Open the “Home Directory” tab and click “A redirection to a URL” then type your SharePoint URL in the “Redirect to:” box.

  1. On the filesystem in your webroot, create a folder structure mimicking the URL
  2. Open IIS Management console and locate that folder
  3. Right-click on that folder and select properties
  4. Use the “A redirection to a URL” option in the Directory tab
  5. Enter the new URL (absolute OR relative) in the Redirect To: box
  6. Test it

All other sites in that path should remain untouched by IIS but since IIS processes this redirection prior to running the ISAPI filter/extension (e.g. SharePoint) then there is no need to even unmange this path from within SharePoint itself.

Server variables

You can configure redirection to a URL and wildcard redirection programmatically. Redirection variables and flags allow you to specify targets and behavior by changing the HttpRedirect metabase property.

The following example shows the format of a simple redirection string.

http://DestinationURL[,Flag[s]]

Where DestinationURL can include the following redirect variables to pass portions of the original URL with the destination URL. You can use more than one variable in a single redirection string.

Example

Two changes should jump out at you. First, the URL ends in $V$Q. The $V represents the original URL the user is trying to access, but without the protocol, servername or parameters. The $Q represents any parameters the URL included. Here’s a crude drawing of how the URL breaks down: redirect to http://servername$V$O

Redirect possibilities:

Here are all the redirection possibilities that I can think of right now, categorized by the type of redirection performed, technology used to perform the redirection, and amount of coding involved. Get ready for this index to be updated with links…

  • Client-Side Redirection using:
    • IIS “Core” (no code) – HttpRedirect
    • IIS “Core” (script code) – HttpErrors and ASP
    • ASP (script code) – Response.Redirect
    • ISAPI Filter (compiled code) – SF_REQ_SEND_RESPONSE_HEADER
    • ISAPI Extension (compiled code) – HSE_REQ_SEND_RESPONSE_HEADER, HSE_REQ_SEND_URL, HSE_REQ_SEND_URL_REDIRECT_RESP
  • Server-Side Redirection using:
    • IIS “Core” (no code involved) – IIsWebFile and ScriptMaps
    • ASP (some code involved) – Server.Transfer and Server.Execute (ASP only)
    • ISAPI Filter (compiled code) – SetHeader( “url” ) in SF_NOTIFY_PREPROC_HEADERS or SF_NOTIFY_AUTH_COMPLETE
    • ISAPI Extension (compiled code) – HSE_REQ_EXEC_URL and HSE_REQ_EXEC_UNICODE_URL and Wildcard Application Mapping
  • Server-Side Forwarding using:
    • ISAPI Filter (compilied code) – Using WinHttp
    • ISAPI Extension (compiled code) – Using WinHttp and Wildcard Application Mapping

More Information:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/41c238b2-1188-488f-bf2d-464383b1bb08.mspx?mfr=true

Posted in IIS, Infrastructure, MOSS | Tagged: , , | Leave a Comment »