• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • Last Modified:

HTTPHandlers doesn't work on the Production server using IIS 7

Hi,

I have created an httphandlers of the js file to spilt one js file into 3 and code save in app_code, It works fine locally but when i publish my files on the productions server the file doesn't exist, Below error is displayed. Both local and production environment have same configuration  and settings.

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.


Below is web.config and IIS 7 is in integrated mode

<system.webServer>
                <modules runAllManagedModulesForAllRequests="true"/>
        <handlers>
            <add name="ContinentsJsHandler" verb="*" path="*/scripts/continents-map.js" type="ContinentsJsHandler" resourceType="Unspecified" />
            <add name="RegionsJsHandler" verb="*" path="*/scripts/regions-map.js" type="RegionsJsHandler" resourceType="Unspecified" />
            <add name="NationsJsHandler" verb="*" path="*/scripts/nations-map.js" type="NationsJsHandler" resourceType="Unspecified" />
        </handlers>
        </system.webServer>

Open in new window




Thanks,
Sportcal
0
sportcal
Asked:
sportcal
  • 7
  • 3
1 Solution
 
CodeCruiserCommented:
What is the URL which gets a 404?
0
 
sportcalAuthor Commented:
I have attach the error i am getting to access below file, As due to policy we can't disclose the original URL

xxx/scripts/continents-map.js
IMG-17092012-165240.png
0
 
sportcalAuthor Commented:
Hi Guys,

I manage to make it work by removing * in the Integrated App pool mode but unfortunately my website is on Classic app pool could anyone provide me the code for the HttpHandlers classic app pool mode, Below is code which works in integrated mode

<system.webServer>
		<modules runAllManagedModulesForAllRequests="true"/>
        <handlers>
            <add name="ContinentsJsHandler" verb="*" path="/scripts/continents-map.js" type="ContinentsJsHandler" resourceType="Unspecified" />
            <add name="RegionsJsHandler" verb="*" path="/scripts/regions-map.js" type="RegionsJsHandler" resourceType="Unspecified" />
            <add name="NationsJsHandler" verb="*" path="/scripts/nations-map.js" type="NationsJsHandler" resourceType="Unspecified" />
        </handlers>
	</system.webServer>

Open in new window


Many Thanks,
Sportcal
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
darjimaulikCommented:
Do you have the Dlls on servers?

Add logs in your handler file and then run it on the server "once". (Keeping a file with logging on production server is not a good idea.)
Add logs at each and every point.
Analyse the log and find till what part your code is executed. and what is the URL which is throwing error.

If your handler needs a file with name abc.js then does it exist on server?
0
 
sportcalAuthor Commented:
The DLL is in App_code folder and js file Rap.js which exist on the server in Scripts/Rap.js.
0
 
darjimaulikCommented:
can u try after adding your dll in bin folder.
0
 
sportcalAuthor Commented:
The Class is in App_Code folder so it's not required to be added in bin folder when you publish your website App_code.dll will exist in the BIN folder, So i am not sure which dll you're talking about.

Regards,
Sportcal
0
 
sportcalAuthor Commented:
I have changed the application pool to Integrated mode instead classic mode, It worked for me
0
 
darjimaulikCommented:
Please share the answer.
0
 
sportcalAuthor Commented:
Hi,

As mention in above comments I have changed the application pool to Integrated mode from classic mode, It worked for me.

I hope you have got the answer.

Thanks,
Shabbir
0
 
sportcalAuthor Commented:
Finally i got the answer through google
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now