Thursday, March 22, 2012

Web service startup path

Hi everyone -

I have a web service that needs to read and write from a local .mdb database.

Sounds simple enough, but the problem comes in when i distribute the web service -

it cannot find the .mdb file...

I know i distribute it with the aspx file, so how do i get the application startup path??

thanks

tony

You should be able to use Server.MapPath("~/") to get the physical root of the executing web application and navigate to your mdb from there.

0 comments:

Post a Comment