Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom Module not loading Javascript fileCustom Module not loading Javascript file
Previous
 
Next
New Post
3/31/2006 5:17 PM
 

Hello,

I have a custom module that references a JavaScript file which is in the installed module directory. I have installed the module on 3 different DNN system (2 @ 3.1 and 1 @ 3.2) and the module works fine. However, on my 4th machine, (DNN 3.2) I get a JavaScript error. I've tracked the problem to the web server or DNN not serving the JavaScript file.

I'm using Page.ResolveUrl("scripts/functions.js") to generate the URL. When the page loads and I view the source of the HTML page, the URL looks correct in the HTML.

E.g. <SCRIPT TYPE="text/JavaScript" SRC="/DesktopModules/MyModule/scripts/functions.js"></SCRIPT>

However, If I copy and paste that URL into my browser, I get a 404 - File Not Found Error.

E.g. http://localhost/DesktopModules/MyModule/scripts/functions.js

If I do the same thing on the machines which are working, the JavaScript file will download. So, I assume it's either a IIS config problem or a DNN problem. Other JavaScript files are working (e.g. the menus on the site work fine). It's just this module which has the problem.

Any suggestions on how to fix this would be greatly appreciated.

Thanks

 
New Post
4/10/2006 3:35 AM
 

did you try:

Page.ResolveUrl("~/DesktopModules/MyModule/scripts/functions.js")

that usually does the trick for me...

 

hope it helps


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
New Post
4/10/2006 7:06 AM
 

Hi Vladan,

Thank you for your reply.

I solved the problem.  DNN in this case was running on a Win2K server which had the IIS LockDown tool run on it.  The IIS LockDown tool does not allow for periods to be in directory names (e.g. MyCompany.ModuleName).  I had to update the IIS LockDown configuration to allow for periods in directory names.

Thanks,
Michael

 
New Post
4/10/2006 8:15 AM
 

Aha.... well, glad that you solved your problem :)

 


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom Module not loading Javascript fileCustom Module not loading Javascript file


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out