Advertisement

02.09.2008 at 10:13AM PST, ID: 23150335
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Priviledge Required Visual Studio 2008 Impersonate Error Access Denied

Tags: Microsoft, Visual Studio Professional 2008, 2008, C#, Unable to start program 'http://localhost:49358/WebSitePath'. A required privilege is not held by the client.
My problem is with impersonation running on my development PC.  When I run with a domain user and password I get;
1. "There were build errors. Would you like to continue and run the last successful build?"
2. "Unable to start program 'http://localhost:49358/WebSitePath'. A required privilege is not held by the client."
3.  Error: "Failed to start monitoring changes to '\\WebServerName\WebSitePath\global.asax' because access is denied"

The funny thing is I don't have a global.asax file.  Of course I made one but I still got the error.

So far I have tried the following advice from the sites below to no avail:
1.  Followed the instructions in the following for both Development PC and servers where applicable:
    a.  http://technet.microsoft.com/en-us/library/2xzyzb0f(VS.80,printer).aspx
    b.  http://msdn2.microsoft.com/en-us/library/aa984236(VS.71,printer).aspx
    c.  http://support.microsoft.com/kb/315158
    d.  http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306158
    e.  http://msdn2.microsoft.com/en-us/library/aa984235(VS.71,printer).aspx
    f.  http://msdn2.microsoft.com/en-us/library/aa719568(VS.71,printer).aspx
    g.  http://msdn2.microsoft.com/en-us/library/aa984237(VS.71,printer).aspx
    h.  http://support.microsoft.com/kb/317012/
    i.  http://blog.devstone.com/Aaron/archive/2004/12/03/359.aspx
    j.  Run this command C:\>CACLS %WINDIR%\assembly /e /t /p domain\uASP:R

2.  Try giving domain\uASP the highest permissions possible on all Servers and Development PC.

I still get the error.  It is driving me crazy as I have spent 10 hours on trying everything.  It seems as if the virtual folder of the VS 2008 Web Server doesn't have permissions.  I can't change any of these since it doesn't exist until run time.

By the way, if I access the website through IE it works fine.  I just need the VS stuff to run correctly for development and debugging.
   

Development PC:
Model: Dell Precision 490 (latest BIOS, etc.)
Os: Vista Ultimate (latest service packs)
Software: Visual Studio 2008 Professional

Web Server:
Model: Dell PowerEdge 2850
OS: Windows Server 2003 SP2

Database Server:
Datebase: SQL Server 2005 (latest service packs)

Microsoft .NET 3.5 installed

This what I have in web.config:

<connectionStrings>
   <add name="dbName" connectionString="Data Source=dataServerName\DBEngineName; Initial Catalog=DatabaseName; Integrated Security=SSPI"/>
</connectionStrings>
.
.
.
<identity impersonate="true" userName="domain\uASP" password="ihateMS"/>

If I change the identity line above to:
<identity impersonate="true"/>
I don't get the error because obviously it is running as the logged on user.


Here is the code from Default.aspx (very basic):

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <p>
        This is the server</p>
    <div>
   
    </div>
    <asp:Label ID="lblInfo" runat="server" Text="Label"></asp:Label>
    </form>
</body>
</html>
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
//Here is the code from my Default.aspx.cs file (it is very simple test to the database):
 
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Configuration;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
 
public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // Create the Connection object.
        string connectionString = WebConfigurationManager.ConnectionStrings["db01"].ConnectionString;
        SqlConnection con = new SqlConnection(connectionString);
 
        try
        {
            // Try to open the connection.
            con.Open();
            lblInfo.Text = "<b>Server Version:</b> " + con.ServerVersion;
            lblInfo.Text += "<br /><b>Connection Is:</b> " + con.State.ToString();
        }
        catch (Exception err)
        {
            // Handle an error by displaying the information.
            lblInfo.Text = "Error reading the database. " + err.Message;
        }
        finally
        {
            // Either way, make sure the connection is properly closed.
            // Even if the connection wasn't opened successfully,
            // calling Close() won't cause an error.
            con.Close();
            lblInfo.Text += "<br /><b>Now Connection Is:</b> " +
            con.State.ToString();
        }
    }
}
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: ascnd
Solution Provided By: ascnd
Participating Experts: 0
Solution Grade: A
Views: 108
Translate:
Loading Advertisement...
02.09.2008 at 08:24PM PST, ID: 20860049

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.10.2008 at 04:10PM PST, ID: 20863268

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.10.2008 at 06:35PM PST, ID: 20863653

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628