Access Dropthings through Virtual directory in IIS

Aug 19, 2008 at 4:10 PM
I have trouble accessing Dropthings locally via a virtual directory in IIS.

I downloaded the latest code (1.7 release) and unzipped into a folder. Open the solution in VS 2008.  Run the default.aspx by right click and select "view in browser". Everything works so far.

Then I went to IIS server and created a virtual directory. It points to "dropthings" folder.  When access default.aspx via http://localhost/virtualdirectoryname/default.aspx, I get all sort of Javascript related errors ("Type" not defined.  "Sys" not defined etc).  What am I doing wrong?  Does anyone know how to fix this?


Aug 30, 2008 at 6:33 PM

In web.config's <appSettings> section, you will see some prefix that maps to http://localhost:8000

When you create IIS vdir, you need to change the prefix to IIS vdir name:\


Sep 2, 2008 at 9:43 PM
Thanks for your reply.  I tried your suggestion by replacing http://localhost:8000 with http://yourservername/vdirname/ for three prefix entries in web.config (css, js, img).  That didn't help.  The error message complains about "Sys", "Type", "Dropping" not defined.  That looks like the ajax/Javascript library objects.  When the errors happen, the following widgets doesn't load: BBC, Horoscope, Weather, How to of the Day etc..  All of these work fine when I invoke the default.aspx directly in VS. 
Sep 3, 2008 at 12:36 AM
I'm having the same issue as jjanehao - tried the proposed resolution and had the same results as before the modification to the Web.config file.
Sep 3, 2008 at 1:13 AM
Is the virtual website configured to use .net 2.0   ?

Sep 3, 2008 at 2:41 PM
Yes, the Virtual Website is configured to use .net 2.0.
Sep 4, 2008 at 8:16 AM

I found the problem. The ScriptCombiner is adding the virtual directory name twice. So, when you host on it makes the Javascript links

However, if you host it on a root site like, it works fine. I have hosted it on without any problem. 

I will get a fix shipped soon.

Sep 8, 2008 at 9:44 PM
I know this is ugly, but i did a quick workaround by changing line 27 in App_Code/StaticContentFilter.cs :


output = scripts;




output = scripts.Replace("/dropthings/dropthings", "/dropthings");


where dropthings is the name of your virtual folder.
I know Omar will correct it the nice way...but he certainly has so many things to do !

Thanks Omar, I read the book and walk (slowly) in your steps :)

Sep 29, 2008 at 12:47 AM
The replace workaround worked for me, should update App_Code/CombineScripts.cs above. Found the tabs didn't have correct reference for virtual folder.  Quick workaround by updating default.aspx.cs line 164 add Request.ApplicationPath: 



tabLink = new HyperLink { Text = page.Title, NavigateUrl = Request.ApplicationPath + "/?" + page.TabName() };

Thanks Omar, I too have purchased you book!  Great Stuff!


Oct 14, 2008 at 5:19 AM
hi Pierre/briancarter,

i cant see


output = scripts;


entry in App_Code/StaticContentFilter.cs to add Replace().

I have got v.1.7.0 aswell.

Am i missing something???

Apr 9, 2009 at 7:38 PM
I have trouble accessing Dropthings locally via a virtual directory in IIS too.
I changed the web.config and I added the replace. Now it works fine.
Thanks Omar, I bought your book.

May 8, 2009 at 11:40 PM
Edited May 8, 2009 at 11:44 PM

I recently changed everything  http://localhost:8000 with http://yourservername/vdirname

I am getting all sort of Javascript related errors ("Type" not defined.  "Sys" not defined etc) just like the original post above. 

I looked at the source code and it looks like this and is breaking the path to the javascript files:

/vdirname/<font color="#3e62a6">http://yourservername/vdirname</font>

I have the recent source code installed.  Can anyone help me?  I am so close!

Jun 23, 2009 at 11:05 AM

I have tried to change these files CombineSripts.cs and StaticContentFile.cs like people said before, but these files aren't in app_Code folder.

I have them in Drophings.Web.Util project.

I have javascripts errors ("Type", "Sys" not defined, etc) like the post above...

Could anyone help me please??????????

I am desperate.....

Thanks a lot.