Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 473563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:11:57+00:00 2026-05-13T00:11:57+00:00

I have a website that I publish in Visual Studio 2008 and then send

  • 0

I have a website that I publish in Visual Studio 2008 and then send off to other people. One of the pages needs to alter a few configuration files, so an action is executed using WindowsImpersonationContext inside a class library referenced by the website.

protected void WithImpersonation(ExecuteUnderImpersonation action)
{
    using(WindowsImpersonationContext context = Request.LogonUserIdentity.Impersonate())
    {
        action();
    }
}

However when someone else tries to submit this page, it throws an error that it was

Unable to save config to file ‘C:\Inetpub\wwwroot\SomeWebsite\web.config’.

Looking at the StackTrace I see this entry:

at
SomeClassLibrary.SomeClass.WithImpersonation(ExecuteUnderImpersonation
action) in FILEPATH FROM MY
MACHINE
:line 23

This appears to be happening on only one specific page, even though multiple pages call this same method.

If I’ve published the website (in Updatable mode) to the PrecompiledWeb folder, and released it with the appropriate references in the bin directory, why does it look for the class on my machine? The error doesn’t even make sense, if its looking for a file that doesn’t exist on their server, shouldn’t they be getting a much different error?

I took the same website and put it up on one of my servers connected to the domain. If I tried running that same page from the server logged in as myself, or on my machine, I don’t receive this error.

A coworker has said before that they also receive this error sometimes, but that it eventually goes away. We can’t pinpoint the cause of the issue, but if the same website were to be checked out of SVN on someone elses computer, published, and then sent off, this error doesn’t happen at all.

Any ideas as to what is going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:11:58+00:00Added an answer on May 13, 2026 at 12:11 am

    That’s part of the Program Debug Database (.PDB file) as far as I know. Well, the part where you think it’s referencing your machine that is.

    You really should use a build server. 😉 But that’s another topic.

    The reason that error happens is because presumably the other users do not have the correct ACL’s set to save to the web folder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web site that built on Visual studio 2008 and i need
I have a webservice that exists in an asp.net website. When I publish the
Where does the App.config go when I publish a website using Visual Studio. I
When I use Build->Publish Web Site in Visual Studio 2008, most of the time
I have built my new website in Visual Studio 2010 (C# - ASP.NET 4).
I have been using the embedded server that visual studio has to test my
I have a asp.net website with c# code behind and using visual studio 2010.
I have a website that plays mp3s in a flash player. If a user
I have a website that I've just uploaded onto the Internet. When I browse
We have a website that uses #include file command to roll info into some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.