Adding A Work Item To TFS 2010 From .NET App Fails Due To Permissions?

Feb 16, 2011

I'm working on an ASP.NET webforms app that will serve as a simple intake form to create work items in TFS 2010.The app works correctly when I run it locally in debug mode--the submission completes and the work item is created.

When I publish the form to our dev server, it yellow screens and throws the following error:

[SecurityException: TF50309: The
following account does not have
sufficient permissions to complete the
following permissions are needed to
perform this operation: View
collection-level information.]

In my code, I'm attempting to access TFS using a service account, and from what I can tell the service account is being used correctly when I run in debug mode.Here's what my C# looks like:

string tfsServerUrl = "http://servername:8080/tfs";
string tfsProject = "Web Team Projects"; [code]....

If I set a breakpoint at the tfs.Authenticate() line, the server object shows the service account name as the current user and IsAuthenticated = true.

The line in the exception that mentions SERVERNAME$ is what's stumping me. It's seems like IIS is deciding to try to access TFS with the app pool identity instead of the credentials that I'm explicitly supplying.Our dev server is a Server 2008 box running IIS 7.

View 1 Replies

Similar Messages:

VS 2010 - Web Page Error When Connecting To Database (permissions)

Dec 9, 2010

My website is [URL] (access there to see error, please) When I was testing in VS2010, it was connecting to the DB because I set permissions READ/WRITE on my computer to ALL. If I put restrictions, VS2010 couldn't just connect to them. Well, I deployed my DB on the server of my website, and I'm not able to access it.

My connection string:

connection = New SqlConnection("Data Source=.SQLEXPRESS; Integrated Security=True;AttachDbFilename=|DataDirectory|Visitas.mdf")

I think I'm getting these errors because my server hasn't permission to access the database.

View 14 Replies

Forms Data Controls :: Repeater Add Before Every 1st Item, Adding After Every 2nd Item?

Oct 6, 2010

I have a repeater control:

<asp:Repeater ID="rep" DataSourceID="XMLDSCompare" runat="server">
<h4><%# XPath("title")%></h4>

Now if its the first item in the total resultset, I want to add <div> to ItemTemplate control, if its the 2nd item, I want to add </div>

So output would be (not including table tags generated by repeater control):

title 1
title 2
title 3
title 4
title 5
title 6

How would I do this in the ItemDataBound event of repeater control?

View 6 Replies

Web Forms :: Why The First Hyperlink Work Well, But Btn1 Fails

Sep 12, 2010

Here's some simple code

[Code]....However, Btn1 does not work..

for some reason i have to NOT to use server control, so i wite it in inline-code style,

why the first hyperlink work well, but Btn1 fails?

View 5 Replies

Web Forms :: Adding A New Row To GridView Fails - Index Out Of Range?

Mar 15, 2011

I'm having a problem when trying to add a new row to a grid view when the grid view paging is "2" for example. Basically, when the data I'm trying to add will be on page number two of the grid, the drop down list I'm trying to bind raises an exception saying that the index is out of range.

How can I add a new grid row with paging and how to tell the drop down list that the row it is looking for is no longer 11, but 1 on the second page?

View 5 Replies

Adding Images In Loop (while Fails

Mar 27, 2011

I have following code that I can only add one image per row although I can add Listbox items as I wanted.

If "imgtag" 1~5 is checked, I get these in the listbox.

ie. ImageID = "cat"

listbox1. item gets - cat1, cat2, cat3, cat4, cat5

however I can only create the last image instead of 5 images.

- imageID - cat5

I assign each image unique ID.

If reader2.HasRows Then
While reader2.Read
Dim img1 = Convert.ToString(reader2("imgtag1"))
Dim img2 = Convert.ToString(reader2("imgtag2"))
Dim img3 = Convert.ToString(reader2("imgtag3"))
Dim img4 = Convert.ToString(reader2("imgtag4"))
Dim img5 = Convert.ToString(reader2("imgtag5"))
Dim blogimg = Convert.ToString(reader2("ImageID"))
Dim a As New HyperLink
a.Attributes.Add("onclick", "return hs.expand(this)")
a.Attributes.Add("href", "../../blog/images/" + blogimg)
Dim img As Image = New Image
img.ImageUrl = "~/blog/images/" + blogimg
img.Width = 200
If img1 = "1" Then
Dim blogimg1 As HtmlTableCell = CType(FindControl("blogimg1"), HtmlTableCell)
img.ID = blogimg + "1"
ListBox1.Items.Add(blogimg + "1")
End If
If img2 = "1" Then
Dim blogimg2 As HtmlTableCell = CType(FindControl("blogimg2"), HtmlTableCell)
img.ID = blogimg + "2"
ListBox1.Items.Add(blogimg + "2")
End If
If img3 = "1" Then
Dim blogimg3 As HtmlTableCell = CType(FindControl("blogimg3"), HtmlTableCell)
img.ID = blogimg + "3"
ListBox1.Items.Add(blogimg + "3")
End If
If img4 = "1" Then
Dim blogimg4 As HtmlTableCell = CType(FindControl("blogimg4"), HtmlTableCell)
img.ID = blogimg + "4"
ListBox1.Items.Add(blogimg + "4")
End If
If img5 = "1" Then
Dim blogimg5 As HtmlTableCell = CType(FindControl("blogimg5"), HtmlTableCell)
img.ID = blogimg + "5"
ListBox1.Items.Add(blogimg + "5")
End If
End While

View 2 Replies

Visual Studio :: 2010 Fails To Render Some Controls With Netfx 3.5?

Dec 31, 2010

fter upgrade to Visual Studio 2010 my web forms targeted to .NET Framework 3.5 that using master pages aren't correctly managed by designer.For example, master pages that contain a ValidationSummary produce an error in design mode in web form that is using that master page.To reproduce, create a new ASP.NET WebSite for the .NET Framework 3.5 and add a master page like this (headers omitted):


then create a new Web Form that use the previous master page and switch in design mode.
In my VS 2010 Pro I see this error when ValidationSummary is rendered: Error creating control ValidationSummary1 - Failed to create designer 'System.Web.UI.WebControls.ValidationSummary, System.Web, Version=,...'

View 6 Replies

Configuration :: VS 2010 Fails To Start Debugging 4.0 When URL Rewrite 2.0 Sections Are Defined In Web.config?

Feb 3, 2011

If application is started without debugging - it runs smoothly, when I press F5 I get: "Unable to start debugging on the web server. Could not start ASP.NET debugging. More information may be available by starting the project without debugging. Click Help for more information"I noticed that problems are caused by URL Rewrite section in web.config:

<clear />
<rule name="LowerCaseRule" stopProcessing="true">
<match url="[A-Z]" ignoreCase="false" />

when I comment it out - I can start debugging. Also debugging works on VS's built-in web server.I'm running Win7 64 bit, VS 2010, application's framework is 4.0, in IIS application has ASP.NET 4.0 Intergrated pool set

View 2 Replies

Visual Studio :: VWD 2010: Copy Web Fails If File Exists On Remote Site

Oct 6, 2010

I just started using VWD 2010 and I used Copy Web to upload the site to the server. However, whenever I try to upload a new version of a file that I've already uploaded, the upload fails, with this error in the log (as an example):

Copy from 'C:UsersLouDocumentsVisual Studio 2010WebSitesgenusus10 ools' to '' started at 10/6/2010 4:00:33 PM.

View 4 Replies

Forms Data Controls :: Retain Values In A FormView When Validations Fails Or The SQL Fails On An Insert?

Oct 6, 2010

To me this should be much easier, but I can't seem to retain the values that are put in the Insert template upon a validation failure or when the sql fails. This will prevent the user from having to retype everything agin in the event of a failure.

As you can see I am using the Sub Insert_Click and not using an insert through the wizard. so the fields are unbound textboxes on the form. There are 2 dropdowns that provide choices for the other fields.

I pasted in the code using the text only option becuase the format was getting messed up. I probably need more background on why the fields are blanking out.


View 8 Replies

Web Forms :: Adding Third Value To Each Item Of Checkboxlist?

Apr 9, 2010

I have a checkboxlist which is being dynamically populated. Code is below.

chklbCourses.DataSource = dt; // datatable returning
CourseName,CourseID and price
chklbCourses.DataTextField = "CourseName";
chklbCourses.DataValueField = "CourseID";

Now I want to add another item to checkboxlist which is price of each item that is coming from database. How can I attach third value "Price" to each item of checkboxlist. Do I need to add attribute or what to each item ?

View 9 Replies

C# - Adding A .ASCX Item To The Sitemap?

Aug 23, 2010

Is there a way to add .ascx files to a sitemap such that it will load/unload the controls based on the last ones visited? The problem is i have a page that contains a few controls that get placed under one another, and i'd like to just be able to jump between them with the sitemap instead of creating a new page for them... this is what i'm trying to put into the sitemap without luck (see Product List, Product Detail):

<siteMapNode url="Default.aspx" title="Home" description="Home Page of Genuity">
<siteMapNode url="UserFunctions/ChangePassword.aspx" title="Change Password" description="Change Password" />
<siteMapNode url="Setup/EditUsers.aspx" title="Edit Users" description="Edit Users" />
<siteMapNode url="Setup/EditTraits.aspx" title="Edit Traits" description="Edit Traits" />
<siteMapNode url="DataEntry/EditSeedPartners.aspx" title="Seed Partners" description="Seed Partners">
<siteMapNode url="WebControls/Product List.ascx" title="Product List" description="Product List" >
<siteMapNode url="WebControls/ProductDetail.ascx" title="Product Detail" description="Product Detail" />

View 1 Replies

VS 2010 - Getting List Item From DataGridview

Apr 19, 2014

Basically, I have a gridview table with a dropdownlist column and I need a way to retrieve the selected item from it. Now I'm using an imagebutton in order to get the selected item from the dropdownlist to pop-up as a message box (as a string). I already know how to get text from a boundfield. However, using the same code to get the dropdown list item won't work. This is a snippet from my code:

ASP code:


Visual Basic code:

<asp:BoundField DataField="Case#" HeaderText="Case#" ReadOnly="True" />
<asp:TemplateField HeaderText="Surgery Time">
<asp:DropDownList ID="Time_Slot" runat ="server">
<asp:ListItem Selected="True" Value="0">Select...</asp:ListItem>
<asp:ListItem Value="1">8:00</asp:ListItem>


View 1 Replies

VS 2010 Add Item To Cart With / Without Logging In?

Apr 2, 2012

why do some e-commerce website can add item to cart without logging in? even if you close the browser, the item is still there when you launch the browser? How did they do that?

View 3 Replies

Adding A Div Overlay To Each Item Of A Repeater Control

Jan 19, 2010

I've added a div overlay to my repeater control using absolute positioning. Predicably, this simply renders all of the divs in the same place. Is there any way that I can put this overlay over each row of my repeater?

<table style="border-style:None;width:350px;border-collapse:collapse;">
<b>User Name</b>
<b>Last Logged On</b>
<asp:Repeater ID="rptUsers" runat="server"
<div style="position:absolute; top:57px; width:350px; height:16px;" />
<asp:Label id="lblUserID" runat="server" Text='<% # Eval("ID") %>'></asp:Label>
<asp:Label id="lblUserName" runat="server" Text='<% # Eval("UserName") %>' ></asp:Label>
<asp:Label ID="lblUserRole" runat="server" Text='<% # Eval("UserRole") %>' ></asp:Label>
<asp:Label ID="lblUserLastLoggedOn" runat="server" Text='<% # ((DateTime)Eval("LastLogin") != DateTime.MinValue) ? Eval("LastLogin") : "Never" %>' ></asp:Label>

View 1 Replies

Adding Attributes To Child Item Of DataGridItemEventArgs?

Jun 2, 2010

I'm adding an attribute to my DataGridItem like this:


How could add an attribute to it's child?

Would it be something like e.Items.Cells[i].Child.Attributes.Add()

View 3 Replies

C# - Selecting An Item In A GridView And Adding To The List?

Dec 2, 2010

I have written the piece of code below to get a productID from a gridView when the user clicks on the select link.


However, if a user clicks on this more than one click the newer value replaces the previous. Is there a way to keep adding to the cart list when the user clicks on a new item?


Here's my code for the Shopping Page:


I dont know if the location of creating the list is important? Wasn't sure if it was placed in the click event if it would keep creating a new instance?

Then for the Basket Page I have:


View 3 Replies

C# - Adding An Item To A Dictionary Results In A NullReferenceException?

Mar 28, 2011

The following code has only thrown a NullReferenceException a handful of times over the last several months, but I'm not exactly sure why. The code isn't mine, but it looks pretty straight forward to me.


The only thing I can think of is that pageType is null when it's being used as a dictionary key, but apparently that is not possible.

The code that calls it is simple:

protected override void OnLoad(EventArgs e)
_mypage = GetPage();

I also thought that the error might be with the _section.Pages, but section is never null and never sets anything. If .Pages[page] returns null, the MyPage constructor simply returns. So what am I missing?

View 5 Replies

VS 2010 Selecting Item From Drop Down List

Dec 7, 2010

I am trying to set the item that is selected from a drop down list based on what it in the database for that particular record. I am filling the dropdown list with a SQL DataSource I have tried a couple of example that I have found for selecting the item in the list but I am always getting the first item in the list as the selected item. This is what I am currently working with:


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If IsPostBack Then


Dim ID = New Guid(Request.QueryString("ID"))


View 9 Replies

VS 2010 - Menu Item Hiding Using SiteMap?

Mar 25, 2011

I have a menu control which is based on a sitemap as below.

However whilst the security aspect is working i.e. users cannot access a page without being in the correct role the menu does not seem to hide any of the menu items.

I really want users only to see the help menu item before they log in, then after this point they should see all items unless they are External in which case the Uploads and Admin Items should be hidden.

Is this not possible or have I set up my sitemap wrong?

If I remove roles="*" from the first node no menu items are visible at all even after login?


View 9 Replies

VS 2010 - Radiobuttonlist Reverts From Selected Item

Apr 24, 2012

II am populating a radiobuttonlist in code on page load, although not when postback is true (I've checked this by the way).

Autopostback is set to true, viewstate is enabled (everywhere I can think of, although only in the content page, if that matters)

When I select an item, the postback happens, the populating does not happen, and the selection reverts back to the first item, which was never selected.

Nowadays I have the knowledge to do this in javascript, but I would prefer not to. It can't be that it should work like this, can it? The control would be useless. I want the index that is selected.

View 11 Replies

Databound Dropdownlist Select An Item / Not Adding A Blank First Row

Nov 22, 2010

I have a databound dropdown list ( I want the page to load with a certain item as the selected item.

I am not adding a blank first row (thats not what i need)I find that I can get this to work with "AppendDataBoundItems" to true, but the side-effect is that I have all the items listed twice.

View 1 Replies

Web Forms :: Way To Dynamically Adding A DataList Item And Chart

Jul 21, 2010

I'm trying to add a DataList to a panel and add a chart to the DataList.


View 1 Replies

Web Forms :: Cant Add Another Item In Dropdown After Adding Items From Datasource?

Jan 2, 2010

After I execute a data reader and put the readed string from the database in my dropdownlistbox, I cannot add another item in it.Here's my code:

Dim com As New OleDbCommand("Select Status from Table where Id = 'somevalue' ", con)
Dim dr As OleDbDataReader


View 5 Replies

VS 2010 How To Work With Aspx

Nov 4, 2010

So, I just made a simple application using WCF Service, The entire application has been made on a Web Form, Witch is a .aspx file, All works well when debugging in local hosting, but when i upload the files that where published to an online FTP and navigate to the .aspx, It shows up as all the coding instead of executing it, Do i need a specific web hoster or am i just being an ultimate noob?

View 9 Replies

Copyrights 2005-15, All rights reserved