Error publishing log file TFS2012 - windows-server-2012

I have en problem with TFS2012 after i have install an Visual Studio 2012 on a Microsoft Server 2012. Im gettting this error:
Exception Message: TF270016: An error occurred publishing log files from 'D:\Builds\3_2\MES_Projects\PJDGatewayTester - Main\Sources\Src\LPS_CMData\PJDGatewayTest.log' to '\\Server\Drop\Build\PJDGatewayTester - Main\PJDGatewayTester - Main_.6\logs'. Details: Access to the path '\\server\Drop\Build\PJDGatewayTester - Main\PJDGatewayTester - Main_.6\logs' is denied. (type PublishLogFileException)
Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Inner Exception Details:
Exception Message: Access to the path '\\server\Drop\Build\PJDGatewayTester - Main\PJDGatewayTester - Main_.6\logs' is denied. (type UnauthorizedAccessException)
Exception Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Microsoft.TeamFoundation.Common.FileSpec.CopyFile(String oldPath, String newPath, Boolean overwriteExisting)
at Microsoft.TeamFoundation.Build.Workflow.Activities.WindowsDropProvider.CopyDirectory(String sourceDirectory, String targetDirectory)
at Microsoft.TeamFoundation.Build.Workflow.Activities.WindowsDropProvider.CopyDirectory(String sourceDirectory, String targetDirectory, String[] renameIfExists)
at Microsoft.TeamFoundation.Build.Workflow.Activities.PublishLogFile.Execute(CodeActivityContext context)
The workflow instance has been canceled. (Reason: The activity 'Try Compile, Test, and Associate Changesets and Work Items' with ID 12211 threw or propagated an exception while being canceled.)
An error occurred while copying diagnostic activity logs to the drop location. Details: Access to the path '\\server\Drop\Build\PJDGatewayTester - Main\PJDGatewayTester - Main_.6\Logs' is denied.
An error occurred while copying diagnostic activity logs to the drop location. Details: Access to the path '\\server\Drop\Build\PJDGatewayTester - Main\PJDGatewayTester - Main_.6\Logs' is denied.

Looks like you just need to give permissions for your build service account to the drop location.

Related

Azure Storage Emulator returns 500 internal server error

I have an application that uses Azure Storage, when I have reinstalled the Azure Storage Emulator and Explorer and then run the app, I get this error.
The app was working before I reinstalled.
[WebException: The remote server returned an error: (500) Internal Server Error.]
Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException(HttpStatusCode expectedStatusCode, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Shared\Protocol\HttpResponseParsers.Common.cs:54
Microsoft.WindowsAzure.Storage.Blob.<>c__DisplayClass57.<PutBlobImpl>b__56(RESTCommand`1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlockBlob.cs:3132
Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse(IAsyncResult getResponseResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:300
[StorageException: The remote server returned an error: (500) Internal Server Error.]
Microsoft.WindowsAzure.Storage.Core.Util.StorageAsyncResult`1.End() in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\StorageAsyncResult.cs:77
Microsoft.WindowsAzure.Storage.Core.Util.<>c__DisplayClass7.<CreateCallbackVoid>b__5(IAsyncResult ar) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\AsyncExtensions.cs:121
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
Microsoft.AspNetCore.DataProtection.AzureStorage.<StoreElementAsync>d__14.MoveNext() +1308
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
Microsoft.AspNetCore.DataProtection.AzureStorage.AzureBlobXmlRepository.StoreElement(XElement element, String friendlyName) +161
Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager.CreateNewKey(Guid keyId, DateTimeOffset creationDate, DateTimeOffset activationDate, DateTimeOffset expirationDate) +1493
Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.CreateNewKey(DateTimeOffset activationDate, DateTimeOffset expirationDate) +150
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded) +645
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.ICacheableKeyRingProvider.GetCacheableKeyRing(DateTimeOffset now) +12
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow) +517
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext) +90
[WebException: The remote server returned an error: (500) Internal
Server Error.]
One of the workaround you may follow to resolve the above issue:
Try to rename the application name with some other name and restart the azure storage emulator(>run AzureStorageEmulator.exe start) and run the application.
Alternatively to resolve with Azure storage explorer please find this SO THREAD as suggested by #Seth .
For more information you can refer this SO THREAD .

Image resizer with azure blob storage. Returns "403 forbidden" when going through the resizer

We have been using image resizer with azurereader2 for quite a while with no problem. After a small release (that really shouldnt have anything to do with this) we suddenly get errors when we try to access the images through the resizer.
This is only a problem on our test environment, the new release and image resizer etc. works just fine in production.
Both production and test is hosted in azure, and both use their own azure blob storage.
example url:
test.mysite.com/images/pim/b6ffa894-bc8f-4f1b-a1e8-ef115b78a56f.jpg?width=250&height=312&format=jpg&scale=both&mode=pad
returns the following error
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
at Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException[T](HttpStatusCode expectedStatusCode, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Shared\Protocol\HttpResponseParsers.Common.cs:line 50
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient.c__DisplayClass13.b__12(RESTCommand`1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobClient.cs:line 788
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse[T](IAsyncResult getResponseResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 299
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndExecuteAsync[T](IAsyncResult result) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 50
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient.EndGetBlobReferenceFromServer(IAsyncResult asyncResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobClient.cs:line 630
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.c__DisplayClass1`1.b__0(IAsyncResult ar) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\AsyncExtensions.cs:line 66
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ImageResizer.Plugins.AzureReader2.AzureReader2Plugin.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ImageResizer.Util.AsyncUtils.RunSync[TResult](Func`1 func)
at ImageResizer.Storage.Blob.Open() in C:\projects\resizer\Plugins\ImageResizer.Storage\Blob.cs:line 41
at ImageResizer.ImageBuilder.GetStreamFromSource(Object source, ResizeSettings settings, Boolean& disposeStream, String& path, Boolean& restoreStreamPosition)
at ImageResizer.ImageBuilder.LoadImage(Object source, ResizeSettings settings, Boolean restoreStreamPos)
at ImageResizer.ImageBuilder.BuildJob(ImageJob job)
at ImageResizer.ImageBuilder.Build(ImageJob job)
at ImageResizer.ImageBuilder.Build(Object source, Object dest, ResizeSettings settings, Boolean disposeSource, Boolean addFileExtension)
at ImageResizer.ImageBuilder.Build(Object source, Object dest, ResizeSettings settings, Boolean disposeSource)
at ImageResizer.ImageBuilder.Build(Object source, Object dest, ResizeSettings settings)
at ImageResizer.InterceptModule.c__DisplayClass5_0.b__1(Stream stream)
at ImageResizer.Plugins.DiskCache.CustomDiskCache.c__DisplayClass28_0.b__0()
at ImageResizer.Plugins.DiskCache.LockProvider.TryExecute(String key, Int32 timeoutMs, LockCallback success)
at ImageResizer.Plugins.DiskCache.CustomDiskCache.GetCachedFile(String keyBasis, String extension, ResizeImageDelegate writeCallback, Int32 timeoutMs, Boolean asynchronous)
at ImageResizer.Plugins.DiskCache.DiskCache.Process(IResponseArgs e)
at ImageResizer.Plugins.DiskCache.DiskCache.Process(HttpContext context, IResponseArgs e)
at ImageResizer.InterceptModule.HandleRequest(HttpContext context, HttpModuleRequestAssistant ra, IVirtualFile vf)
at XXX.Web.Modules.CustomImageResizingInterceptModule.HandleRequest(HttpContext context, HttpModuleRequestAssistant ra, IVirtualFile vf) in E:\TeamCity\buildAgent\work\4773e55a378b97a1\src\Portal\Portal\Infrastructure\Web\Modules\CustomImageResizingInterceptModule.cs:line 15
at ImageResizer.InterceptModule.CheckRequest_PostAuthorizeRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Request Information
RequestID:e8c13071-0001-00c2-437e-d8b9c7000000
RequestDate:Mon, 29 May 2017 13:19:16 GMT
StatusMessage:Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
the url
test.mysite.com/images/pim/b6ffa894-bc8f-4f1b-a1e8-ef115b78a56f.jpg correctly redirects to the image in the azure blob.
I have tried regenerating the access key for the blob storage, without any luck.
I have tried pointing to another blob storage from our test env, that does not work either.
I can access the test blob storage just fine from my local environment.
/resizer.debug reports 0 issues detected.
Any help is greatly appreciated, let me know if i can provide additional info.
This is purely a azure blob storage connection problem, image resizer is not the culprit.

Error during deployment to azure from visual studio online

I'm getting this weird error when trying to deploy to azure from visual studio online:
Exception Message: Could not find a part of the path 'd:\a\src'. (type DirectoryNotFoundException)
Exception Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at Microsoft.TeamFoundation.Deployment.Workflow.Activities.FindPackageAndParametersFile.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
I'm pretty sure that I am not using a folder named 'd:\a\src' in my solution.
I was able to fix it by changing the Build Agent Folder to something that involves $(SourceDir).

Azure Website/Visual Studio Online Continuous Deployment fails for Website

I hooked up a Web Site project in Visual Studio 2013 to the continuous deployments within Azure Web Sites. Checking-in triggers a build, but I receive the following error:
Exception Message: The deployment package file (*.zip) was not found.
Ensure that PackageAsSingleFile msbuild property is not set to False.
(type FileNotFoundException) Exception Stack Trace: at
Microsoft.TeamFoundation.Deployment.Workflow.Activities.FindPackageAndParametersFile.Execute(CodeActivityContext
context) at
System.Activities.CodeActivity.InternalExecute(ActivityInstance
instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at
System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor
executor, BookmarkManager bookmarkManager, Location resultLocation)
I added the msbuild argument for PackageAsSingleFile=false to the build configuration, but it doesn't seem to make a difference.
Any ideas?
Thanks in advance!

IIS failing to start: Error BC2000

When i try to start a ASP.net site on IIS 7.5, i get the following error
BC2000: compiler initialization failed unexpectedly: 0x80070005
Searching around i found a possible solution: Go to security settings of C:\Windows\Temp folder and add Full Control permission to users "NETWORK SERVICE" and IIS_IUSRS.
But i did that and the error goes on.
In my machine %temp% points to C:\Users\sp\AppData\Local\Temp , which have those permissions as well.
I also tried using the utility "aspnet_regiis" to reinstall ASP.
Here's the full event log entry (Application Warning 1310):
Event code: 3007
Event message: A compilation error has occurred.
Event ID: 733bee25fcbe4f0ab74b7fc56ce833d7
Event sequence: 3
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/5/ROOT-1-129798160562503533
Trust level: Full
Application Virtual Path: /
Process information:
Process ID: 8040
Process name: w3wp.exe
Account name: IIS APPPOOL\myapp
Exception information:
Exception type: HttpCompileException
Exception message: vbc : Fatal (0): error BC2000: compiler initialization failed unexpectedly: 0x80070005
Request information:
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: sp-PC\sp
Thread information:
Thread ID: 8
Thread account name: sp-PC\sp
Is impersonating: False
Stack trace: at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed)
at System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories)
at System.Web.Compilation.BuildManager.CompileCodeDirectories()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
So what i did to work was changing the user of the application pool to the machine administrator (IIS Manager > Application Pools > Advanced Settings > Identity). But that don't seem very safe.
So my question is: Why it isnt working with "Built-in Account" (I tried ApplicationPoolIdentity and NetworkService).
Try below steps-
Set True "Enable 32-bit Applications" for your default application pool if you are running on x64 machine.
Grant Full Accesses for NETWORK SERVICE and IIS_IUSRS on
C:\Windows\Temp\
Grant Full Accesses for NETWORK SERVICE and IIS_IUSRS on
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
Grant Full Access to the user "Network Service" to the folder C:\Windows\Temp

Resources