index > Team Foundation Server - Version Control > TFS API - using ASP.net to checkout the file and modify and check...

TFS API - using ASP.net to checkout the file and modify and check...


Hi I tried to checkout the file from tfs version control and the file gets checkedout and after modifying the file the check in failing with the following error: TF30063: You are not authorized to access Microsoft-IIS/6.0.

I have a requirement to checkout a file and change the file and checkin the file.

I tried all means but not able to get through.

Here is the code snippet:

void CheckOutCheckIn(string filename,bool Undeploy)

{

try

{

if (CheckTheRunningJob(filename) == true)

{

Label2.Text = filename + " job is in the running state. Please try later.";

return;

}

TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(tfsName);

VersionControlServer vcs = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));

UserName = vcs.AuthenticatedUser;

Workspace[] workspaces = vcs.QueryWorkspaces(WorkspaceName, UserName,ComputerName);

Workspace workspace = null;

if (workspaces.Length == 0)

workspace = vcs.CreateWorkspace(WorkspaceName, UserName, WorkspaceComment);

else

workspace = workspaces[0];

 

if (!workspace.IsServerPathMapped(ProjectServerPath))

{

workspace.Map(ProjectServerPath, ProjectLocalPath);

}

PendingSet[] sets = workspace.QueryPendingSets(new string[] {"$/Manifests/ManifestStore/" + filename},RecursionType.Full, WorkspaceName, UserName, false);

if (sets.Length != 1)

{

Label2.Text = "No pending sets.";

//workspace.PendEdit(new string[] { DIR + filename }, RecursionType.OneLevel, null, LockLevel.CheckOut);

workspace.PendEdit(new string[] { DIR + filename });

LoadGrid(Undeploy);

CheckTheService();

dm.WriteXml(DIR + filename);

PendingChange[] pendingChange = workspace.GetPendingChanges(new string[] { DIR + filename });

if (pendingChange.Length >= 0)

{

Label2.Text = Label2.Text + "Comming here." + pendingChange;

int changesetNumber = workspace.CheckIn(pendingChange, UserName + " Modified at :" + DateTime.Today.ToString());

Label2.Text = Label2.Text + "Checked in changeset: " + changesetNumber;

}

//PendingChange[] changes = workspace.GetPendingChanges(DIR + filename,RecursionType.OneLevel);

//if (changes.Length > 0)

//{

// int changeSetNumber =

// workspace.CheckIn(changes, " Checked in the file" + DateTime.Today.ToString());

// Label2.Text = Label2.Text + " Checked in the file: " + DIR + filename + " Changeset: " + changeSetNumber;

// UpdateJobStatus(filename);

// Label2.Text = Label2.Text + " Updated the database.";

//}

UpdateJobStatus(filename);

SendEMail("ManifestChanged", DIR + filename);

Label2.Text = Label2.Text + " Email Sent.";

Response.Redirect("Run.aspx");

}

else

{

Label2.Text = "The file is checkedout.";

}

} catch (Exception ex) {

Label2.Text = "Exception occured :" + ex.Message;

} finally

{

}

}

 

Here is the log:

9/26/2006 3:19:16 PM (pid 5544, tid 5604, 30 ms) Using cache file path C:\Documents and Settings\\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache\VersionControl.config
9/26/2006 3:19:16 PM (pid 5544, tid 5604, 30 ms) Session ID: 36aa14fa-b8a7-47f9-af1b-226a9d5b554a
9/26/2006 3:19:16 PM (pid 5544, tid 5604, 449 ms) ConnectionLimit = 32, BypassProxyOnLocal = False, EnableCompression = True, DefaultTimeout = 300000
9/26/2006 3:19:16 PM (pid 5544, tid 5604, 449 ms) User agent: Team Foundation (aspnet_wp.exe, 8.0.50727.147)
9/26/2006 3:19:16 PM (pid 5544, tid 5604, 573 ms) Web method running: [http://xxxxxxx01:8080/Services/v1.0/ServerStatus.asmx] CheckAuthentication[Ser]
9/26/2006 3:19:16 PM (pid 5544, tid 5604, 681 ms) Web method response: [http://xxxxxxx01:8080/Services/v1.0/ServerStatus.asmx] CheckAuthentication[Ser] 179 ms
9/26/2006 3:19:17 PM (pid 5544, tid 5604, 1409 ms) Web method running: [http://xxxxxxx01:8080/Services/v1.0/Registration.asmx] GetRegistrationEntries[Ser]
9/26/2006 3:19:17 PM (pid 5544, tid 5604, 1456 ms) Web method response: [http://xxxxxxx01:8080/Services/v1.0/Registration.asmx] GetRegistrationEntries[Ser] 46 ms
9/26/2006 3:19:17 PM (pid 5544, tid 5604, 1827 ms) Web method running: [http://xxxxxxx01:8080/Services/v1.0/GroupSecurityService.asmx] ReadIdentity[Ser]
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1874 ms) Web method response: [http://xxxxxxx01:8080/Services/v1.0/GroupSecurityService.asmx] ReadIdentity[Ser] 33 ms
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1889 ms) Time spent getting service URL ISCCProvider: 0 ms
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1889 ms) CreateWebRequest() -- Uri: http://xxxxxxx01:8080/VersionControl/v1.0/repository.asmx
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1889 ms) request.AutomaticDecompression: GZip
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1889 ms) Web method running: [VersionControl/] QueryWorkspaces[Ver]
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1920 ms) HTTP headers:
Content-Encoding:
Vary: Accept-Encoding
Transfer-Encoding: chunked
Cache-Control: private, max-age=0
Content-Type: application/soap+xml; charset=utf-8
Date: Tue, 26 Sep 2006 19:19:13 GMT
Server: Microsoft-IIS/6.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET

9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1920 ms) Web method response: [VersionControl/] QueryWorkspaces[Ver] 20 ms
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1920 ms) CreateWebRequest() -- Uri: http://xxxxxxx01:8080/VersionControl/v1.0/repository.asmx
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1920 ms) request.AutomaticDecompression: GZip
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1920 ms) Web method running: [VersionControl/] QueryPendingSets[Ver]
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1936 ms) HTTP headers:
Content-Encoding:
Vary: Accept-Encoding
Transfer-Encoding: chunked
Cache-Control: private, max-age=0
Content-Type: application/soap+xml; charset=utf-8
Date: Tue, 26 Sep 2006 19:19:13 GMT
Server: Microsoft-IIS/6.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET

9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1936 ms) Web method response: [VersionControl/] QueryPendingSets[Ver] 20 ms
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1936 ms) CreateWebRequest() -- Uri: http://xxxxxxx01:8080/VersionControl/v1.0/repository.asmx
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1936 ms) request.AutomaticDecompression: GZip
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 1936 ms) Web method running: [VersionControl/] PendChanges[Ver]
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2029 ms) HTTP headers:
Content-Encoding:
Vary: Accept-Encoding
Transfer-Encoding: chunked
Cache-Control: private, max-age=0
Content-Type: application/soap+xml; charset=utf-8
Date: Tue, 26 Sep 2006 19:19:13 GMT
Server: Microsoft-IIS/6.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET

9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2029 ms) Web method response: [VersionControl/] PendChanges[Ver] 92 ms
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2029 ms) ProcessOperation() -- processing operation: GetOperation instance 65488131
  HashValue: [16]19, 140, 30, 132, 38, 244, 251, 101, 249, 78, 246, 218, 135, 228, 169, 70
  ItemType: File
  ItemId: 73768
  SourceLocalItem: C:\Manifests\ManifestStore\Dev01.xml
  TargetLocalItem: C:\Manifests\ManifestStore\Dev01.xml
  TargetServerItem: $/Manifests/ManifestStore/Dev01.xml
  VersionServer: 3049
  VersionLocal: 3049
  DeletionId: 0
  ChangeType: Edit
  LockLevel: None
  IsLatest: True
  PendingChangeId: -98567
  HasConflict: False
  ConflictingChangeType: None
  ConflictingItemId: 0
  DownloadUrl: sfid=39798,0,0,0,0,0,0,0,0,0&ts=632949815539074944&s=bzf1lQEYBM%2BOi1q5oyuGcg9ENt34uq0s28Rd40qoonP%2FPqb6%2Fmfzmr66eeEKTMYKYabkGwhtSMbsDyz2UbAk77i1Hyhu8GnnyRsy7d0838ZTZ403V6b%2FrR4MOWJ9CFXMLBAOHd3KEVnAir1r57nO1hI5F4zmKDfj1iqEIVrGqe4%3D&fid=39798

9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2029 ms) Recording OperationStatus.Getting for $/Manifests/ManifestStore/Dev01.xml
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2029 ms) DownloadFiles: 2 ms
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2029 ms) Acknowledgements: 0 ms
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2075 ms) CreateWebRequest() -- Uri: http://xxxxxxx01:8080/VersionControl/v1.0/repository.asmx
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2075 ms) request.AutomaticDecompression: GZip
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2091 ms) Web method running: [VersionControl/] QueryPendingSets[Ver]
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2106 ms) HTTP headers:
Content-Encoding:
Vary: Accept-Encoding
Transfer-Encoding: chunked
Cache-Control: private, max-age=0
Content-Type: application/soap+xml; charset=utf-8
Date: Tue, 26 Sep 2006 19:19:14 GMT
Server: Microsoft-IIS/6.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET

9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2106 ms) Web method response: [VersionControl/] QueryPendingSets[Ver] 18 ms
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2106 ms) FileUploader.BeginUploadFile localFileName: C:\Manifests\ManifestStore\Dev01.xml
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2106 ms) Begin upload [id=0] C:\Manifests\ManifestStore\Dev01.xml
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2106 ms) Web method running: [http://xxxxxxx01:8080/] Ver-Upload: Dev01.xml
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2106 ms) Upload MD5 calc id = 0: 1805 bytes in 0 ms
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2106 ms) Upload id = 0 useCompression = True
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2106 ms) Time spent getting service URL Upload: 0 ms
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2106 ms) CreateWebRequest() -- Uri: http://xxxxxxx01:8080/VersionControl/v1.0/upload.asmx
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2122 ms) HTTP headers:
Content-Length: 83
Content-Type: text/html
Date: Tue, 26 Sep 2006 19:19:14 GMT
Server: Microsoft-IIS/6.0
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET

9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2122 ms) Completed upload: id = 0 in 20 ms, active = 1
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2122 ms) Web method response: [http://xxxxxxx01:8080/] Ver-Upload: Dev01.xml 20 ms
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2122 ms) Recorded m_exception in UpDownAsyncResult.Completed(): Microsoft.TeamFoundation.VersionControl.Client.VersionControlException: C:\Manifests\ManifestStore\Dev01.xml: TF30063: You are not authorized to access Microsoft-IIS/6.0. ---> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access Microsoft-IIS/6.0.
   at Microsoft.TeamFoundation.VersionControl.Client.FileUploader.HandleErrorResponse(HttpWebResponse response)
   --- End of inner exception stack trace ---
   at Microsoft.TeamFoundation.VersionControl.Client.FileUploader.UploadChunk(FileStream fileContentStream, Int64 end)
   at Microsoft.TeamFoundation.VersionControl.Client.FileUploader.UploadContent()
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2122 ms) AsyncUploadFileState.Completed -- caught and converted:
Microsoft.TeamFoundation.VersionControl.Client.VersionControlException: C:\Manifests\ManifestStore\Dev01.xml: TF30063: You are not authorized to access Microsoft-IIS/6.0. ---> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access Microsoft-IIS/6.0.
   at Microsoft.TeamFoundation.VersionControl.Client.FileUploader.HandleErrorResponse(HttpWebResponse response)
   --- End of inner exception stack trace ---
   at Microsoft.TeamFoundation.VersionControl.Client.Workspace.EndUploadFile(IAsyncResult asyncResult)
   at Microsoft.TeamFoundation.VersionControl.Client.Workspace.AsyncUploadFileState.Completed(IAsyncResult asyncResult)
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2122 ms) Total UploadFiles: 21 ms
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2122 ms) Cumulative stats: Bytes uncompressed = 1805, Bytes compressed = 708, Compression = 60%
9/26/2006 3:19:18 PM (pid 5544, tid 5604, 2122 ms) Using cache file path C:\Documents and Settings\xxxxxxxx\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache\VersionControl.config


 

Thanks

Sriman

Sriman

Buck: Firstly, I would like to thank you for your response. I changed the web.config file to

<identity impersonate="true"
userName="xxxx\xxxxxx"
password="********"/>


Then added the following to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config


<processModel enable="true"
userName="Machine"
password="AutoGenerate"/>

It works fine. Only issue That I have currently is that after running five or six times now I get the following

Access to the path 'C:\xxxx\xxxxxx\xxx.xml' is denied.

It looks like it is a refresh issue.

I think this file is causing the issue.
C:\Documents and Settings\xxxxxx\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache\VersionControl.config

Thanks again

Sriman Bapatla

-----Original Message-----
From: Buck Hodges [mailto:buckh@microsoft.com]
Sent: Tuesday, September 26, 2006 4:11 PM
To: Bapatla, Sriman N
Subject: RE: (Buck Hodges) : Error


Checkout (PendEdit) doesn't use the ThreadPool. Uploading and downloading occur on a background thread from the ThreadPool.

Buck

-----Original Message-----
From: Bapatla, Sriman N
Sent: Tuesday, September 26, 2006 04:07 PM
To: Buck Hodges
Subject: RE: (Buck Hodges) : Error

Thanks again, how to run the worker process under an account that has
access to the server. I have full access to the server for testing. I
had similar problem with VSS 6.0, in vss 6.0 I was not able to checkout
and checkin.
But with tfs I can checkout the file with no problem but not check in
using aspnet_wp.exe.

Thanks
Sriman


-----Original Message-----
From: Buck Hodges [mailto:buckh@microsoft.com]
Sent: Tuesday, September 26, 2006 3:53 PM
To: Bapatla, Sriman N
Subject: RE: (Buck Hodges) : Error


Okay, the key part here is that it is an ASP.NET web app.

CheckIn() uses the ThreadPool to upload files to the server (Get() uses
it to download files). Unfortunately, the ThreadPool threads get the
identity from the worker process, which is aspnet_wp.exe in your case
(that's near the top of the log file), rather than the credentials used
on the "main" thread. As a result, the upload fails authorization. If
you look in the event log on the application tier, you'll probably find
a corresponding event recording that someone tried to upload but failed.

The only work around at this point is to run the worker process under an
account that has access to the server.

Buck

9/26/2006 3:19:16 PM (pid 5544, tid 5604, 449 ms) User agent: Team
Foundation (aspnet_wp.exe, 8.0.50727.147)

9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2122 ms) Web method response:
[http://xxxxxxxxx:8080/] Ver-Upload: Dev01.xml 20 ms
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2122 ms) Recorded m_exception
in UpDownAsyncResult.Completed():
Microsoft.TeamFoundation.VersionControl.Client.VersionControlException:
C:\Manifests\ManifestStore\Dev01.xml: TF30063: You are not authorized to
access Microsoft-IIS/6.0. --->
Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException:
TF30063: You are not authorized to access Microsoft-IIS/6.0.
at
Microsoft.TeamFoundation.VersionControl.Client.FileUploader.HandleErrorR
esponse(HttpWebResponse response)
--- End of inner exception stack trace ---
at
Microsoft.TeamFoundation.VersionControl.Client.FileUploader.UploadChunk(
FileStream fileContentStream, Int64 end)
at
Microsoft.TeamFoundation.VersionControl.Client.FileUploader.UploadConten
t()
9/26/2006 3:19:18 PM (pid 5544, tid 4540, 2122 ms)
AsyncUploadFileState.Completed -- caught and converted:
Microsoft.TeamFoundation.VersionControl.Client.VersionControlException:
C:\Manifests\ManifestStore\Dev01.xml: TF30063: You are not authorized to
access Microsoft-IIS/6.0. --->
Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException:
TF30063: You are not authorized to access Microsoft-IIS/6.0.
at
Microsoft.TeamFoundation.VersionControl.Client.FileUploader.HandleErrorR
esponse(HttpWebResponse response)
--- End of inner exception stack trace ---
at
Microsoft.TeamFoundation.VersionControl.Client.Workspace.EndUploadFile(I
AsyncResult asyncResult)
at
Microsoft.TeamFoundation.VersionControl.Client.Workspace.AsyncUploadFile
State.Completed(IAsyncResult asyncResult)

-----Original Message-----
From: Bapatla, Sriman N
Sent: Tuesday, September 26, 2006 03:29 PM
To: Buck Hodges
Subject: RE: (Buck Hodges) : Error


Here is the log, sorry to bother you.


<<tf.log>>

Thanks
Sriman
> -----Original Message-----
> From: Bapatla, Sriman N
> Sent: Tuesday, September 26, 2006 3:16 PM
> To: 'Buck Hodges'
> Subject: RE: (Buck Hodges) : Error
>
> Hi: Thank you for your immediate response. I turned the trace on. It
> is still throwing the same error.
>
> workspace.PendEdit(new string[] { DIR + filename });
> The file is being checkedout for edit with no problem.
>
> After checkout I modified the file(I load a grid and export the xml
> file,means overwrite the file) and at the time of checkin with the
> below code
>
>
> PendingChange[] changes = workspace.GetPendingChanges(DIR + filename);
>
> if (changes.Length > 0)
>
> {
>
> int changeSetNumber =
>
> workspace.CheckIn(changes, " Checked in
> the file" + DateTime.Today.ToString());
>
>
> The file is not getting checked-in. I get the TF30063: You are not
> authorized to access http://<tfs sever name>:8080
> Is anything wrong with check-in this way. I looked at your post it
> describes only adding new files not the files already exists in tfs.
>
> I really appreciate your help!!!
>
> Note: I'm trying to checkout a file and overwrite(replace) the file
> with new stuff and trying to checkin the file using asp.net 2.0
> application.
>
> Thanks
> Sriman
>
> -----Original Message-----
> From: Buck Hodges [mailto:buckh@microsoft.com]
> Sent: Tuesday, September 26, 2006 2:49 PM
> To: Bapatla, Sriman N
> Subject: RE: (Buck Hodges) : Error
>
>
> Try turning on client-side tracing.
>
> Put the following into the .exe.config file for your application (it's
> the same stuff that's commented out in the tf.exe.config file).
>
> <system.diagnostics>
> <switches>
> <add name="TeamFoundationSoapProxy" value="4" />
> <add name="VersionControl" value="4" />
> </switches>
> <trace autoflush="true" indentsize="3">
> <listeners>
> <add name="myListener"
>
> type="Microsoft.TeamFoundation.TeamFoundationTextWriterTraceListener,M
> icrosoft.TeamFoundation.Common, Version=8.0.0.0, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a"
> initializeData="c:\tf.log" />
> </listeners>
> </trace>
> </system.diagnostics>
>
> Make sure the account has write permissions to c:\tf.log. Run your
> app, and then take a look at the trace in the log file. Let me know
> what you find.
>
> Buck
>
>
> -----Original Message-----
> From:
> Sent: Tuesday, September 26, 2006 11:42 AM
> To: Buck Hodges
> Subject: (Buck Hodges) : Error
> Importance: High
>
>
>
> I get the error you are not authorized to the server. I do not have
> Google accelerator installed on my machine, it works fine for the
> first time, the subsequent check in checkouts are failing. The account
> I'm using has full privs on the tfs server.
>
>
>
> Here is the code :
>
>
>
> void CheckOutCheckIn(string filename,bool Undeploy)
>
> {
>
> try
>
> {
>
> if (CheckTheRunningJob(filename) == true)
>
> {
>
> Label2.Text = filename + " job is in the running
> state. Please try later.";
>
> return;
>
> }
>
> TeamFoundationServer tfs =
> TeamFoundationServerFactory.GetServer(tfsName);
>
> VersionControlServer vcs =
> (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
>
> UserName = vcs.AuthenticatedUser;
>
> Workspace[] workspaces =
> vcs.QueryWorkspaces(WorkspaceName, UserName,ComputerName);
>
> Workspace workspace = null;
>
>
>
> if (workspaces.Length == 0)
>
> workspace = vcs.CreateWorkspace(WorkspaceName,
> UserName, WorkspaceComment);
>
> else
>
> workspace = workspaces[0];
>
>
>
>
>
> if (!workspace.IsServerPathMapped(ProjectServerPath))
>
> {
>
> workspace.Map(ProjectServerPath,
> ProjectLocalPath);
>
> }
>
>
>
> PendingSet[] sets = workspace.QueryPendingSets(new
> string[] {"$/Manifests/ManifestStore/" + filename},RecursionType.Full,
> WorkspaceName, UserName, false);
>
>
>
> if (sets.Length != 1)
>
> {
>
> Label2.Text = "No pending sets.";
>
> workspace.PendEdit(new string[] { DIR + filename
> }, RecursionType.OneLevel, null, LockLevel.CheckOut);
>
> LoadGrid(Undeploy);
>
> CheckTheService();
>
> dm.WriteXml(DIR + filename);
>
>
>
> PendingChange[] changes =
> workspace.GetPendingChanges(DIR + filename,RecursionType.OneLevel);
>
> if (changes.Length > 0)
>
> {
>
> int changeSetNumber =
>
> workspace.CheckIn(changes, " Checked in
> the file" + DateTime.Today.ToString());
>
> Label2.Text = Label2.Text + " Checked in the
> file: " + DIR + filename + " Changeset: " + changeSetNumber;
>
> UpdateJobStatus(filename);
>
> Label2.Text = Label2.Text + " Updated the
> database.";
>
> }
>
>
>
> SendEMail("ManifestChanged", DIR + filename);
>
> Label2.Text = Label2.Text + " Email Sent.";
>
> //Response.Redirect("Run.aspx");
>
>
>
> }
>
> else
>
> {
>
>
>
> Label2.Text = "The file is checkedout.";
>
> }
>
>
>
> } catch (Exception ex) {
>
> Label2.Text = "Exception occured :" + ex.Message;
>
>
>
> } finally
>
> {
>
>
>
> }
>
> }
>
> ----------------------------------
>
> This message was generated from a contact form at:
> http://blogs.msdn.com/buckh/default.aspx
>
>
>
> Your contact information was not shared with the user.
>
>
>

Sriman
reply 2

You can use google to search for other answers

 

More Articles

Version Control permissions
migration_settings.xml
VS.NET 2003 and Team Foundation Server
Extend version control at time of check in
Error in unshelve - 'Cannot insert null @MissingParents.ItemId'
tf merges command - slow - timing out - uses lots of memory
How to checkin changes with a comment that has new lines in it?
Adding a previously deleted directory
Adding CC list to work item/bug?
.net api for Team Foundation Version Control?
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Orphaned branch
Getting latest version...
Checkin changes on behalf of another user
Merge Conflict - All options diabled
Source tree collapses - get specific ver…
Error in VS2005 on Get Latest command
Merging From Branch to Branch
SQL Server 2005 version control - Only f…
Sharing common components across project…
Request.ServerVariables("HTTP_AUTHO…
Feature request - Check in approvals
Source branching questionnaire
Disable multiple checkout for designer.v…
team system version control for non micr…
No appropriate mapping exists for $/Proj…

Hot Articles

Sharing issue in VSTS Source control
The Selected file cannot be opened as a …
UI Bug
One problem in security setting
Source Control Reporting
Migration error TF60096 - false alarm??
Request.ServerVariables("HTTP_AUTHO…
TFS Folder Renames...
Version control API - basic recipes
Working folder confusion???
Custom check-in policy
Workspace remain in the windows 2000 use…
Merge by WI
How to select a custom SC path when crea…
Team Foundations Server and VS2003

Recommend Articles

Team Foundation Server MSSCCI With Visua…
Merge, Rollback issue
Source branching questionnaire
VSS Migration Errors - TF60096
Checkin problem in TFS MSSCCI Final
Files scrambled after VSS migration
Is this Is right Way to Share Code in TF
Newbie question...... How to get startin…
whitepaper, docs about version control
Preserve timestamp on files when getting…
Few questions on merging through the API
Merging of files which have not been bra…
Upgraded from VSS, Web app bindings not …
Pending changes shows items checked out …
API function to display 'Choose Source c…