Social Icons

Friday, 29 September 2017

[SOLVED] access denied can not execute the program csc.exe after publishing .net application web deploy mvc app

Hi, Recently i encountered this error after publishing an application to winhost server.

Error stacktrace is
[Win32Exception (0x80004005): Access is denied]

[ExternalException (0x80004005): Cannot execute a program. The command being 
executed was "E:\web\nrgwareh\bin\roslyn\csc.exe"

It is an mvc application using visual studio 2017 , targeted framework is 4.6.2.

I just published using webdeploy method. it is successfully deployed but when i try to run i encountered this one like

when i run locally its working fine. But here problem is winhost doesn't allow csc.exe to run which is roslyn compilation.

When we create a web application either webforms or mvc using .net framework 4.5 > then project is pre installed with roslyn csc.exe compilation. although it was successfully published to hosting environment, but some servers doesn't allow to run that roslyn compiler.

Solution 1:

Here solution is just compile and deploy project without any roslyn or any csc.exe files.

just go to Nuget manager, find  the package Microsoft.CodeDom.Provider.DotnetCompilerPlatform , uninstall it.

Now rebuild and re publish, then this problem gone away.

Solution 2:

In some hosting environments we have option to allow or run csc.exe files, just change that setting or allow read/write to exe files, it get's fixed.

Hope it can be useful to some folks.

Tuesday, 5 September 2017

[Solved] Extender Provider failed to return an Extender for this project - Visual Studio Community 2015

Hi.., Recently i encountered visual studio designer exception when i try to open EDM file in visual studio " Extender Provider failed to return an Extender for this project " like this below

Problem is i have been running the application 5 hours plus time, without stopping in local.

Then when i try to view edmx file, encounter this exception.

To stop this exception just reload the project so that all objects gets created again and available to view.

When an application is running idle for hours, it is better to reload that project.

You don't have to delete obj and bin folders. But for different situations it may work. Possibly when this exception encountered while in working in designer mode by simply reloading project, you can remove that exception.

Saturday, 18 February 2017

[Solved] : failed to create component 'Report Viewer' System.runtime.interopservices.COMException(0x8004D745)

Hi there. Recently i encountered this error when i migrated visual studio 2008 windows application to vs 2012 . Here i am dragging  report viewer to control on windows form, then i encountered a long list of error message

Problem is project reference is enabled for version 10.0.0 for report viewer but toolbox is adding version.

Solution: just add the System.ReportViewer.Winforms version remove version.

You will get these kind of designer errors when you migrate to higher version. Just check the references added to project properly.

Hope it helps you.