Results 1 to 4 of 4

Thread: Web.Config ..

  1. #1

    Thread Starter
    Hyperactive Member spoiledkid's Avatar
    Join Date
    Oct 2002
    Location
    Canada
    Posts
    437

    Web.Config ..

    Is it possible to Access Web.Config file from JavaScript in an ASP.NET application ?? If yes, could someone show me how ?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Web.Config ..

    No it isn't. IIS doesn't allow you to read web.config directly. Instead, you'll have to generate your javascript dynamically with values inserted from web.config. What do you want to accomplish?

  3. #3

    Thread Starter
    Hyperactive Member spoiledkid's Avatar
    Join Date
    Oct 2002
    Location
    Canada
    Posts
    437

    Re: Web.Config ..

    Quote Originally Posted by mendhak
    No it isn't. IIS doesn't allow you to read web.config directly. Instead, you'll have to generate your javascript dynamically with values inserted from web.config. What do you want to accomplish?
    My Web config has a key that I want to read on the fly ...

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>

    <appSettings>
    <add key="LegalAdmin.Admin.Jobs" value=[b]"http://localhost/Legal_TM/LegalAdmin_WS/Jobs.asmx"[b]/>
    </appSettings>
    </configuration>

    Basically, its a Web Service address that I want to read from my java script ...

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Web.Config ..

    I think you'll have to go with the javascript generation approach as I mentioned earlier.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width