Asp.net core compilation issue with VS2017 community edition - asp.net-core

I have installed VS 2017 Community edition with below workload on my machine (Windows-7 64 bit).
ASP.Net and Web Development.
Azure Development
.Net Desktop Development.
.NET Core cross-platform development.
I'm getting error message as 'Unable to attach to application 'dotnet.exe' (PID:2472) using 'xxxx-user' The address is not valid for this context'
while compiling the simple Asp.net core application.
Tried some workarounds like repairing the VS installation, deleting bin and obj folder still facing same issue.

Related

Running IIS Express in 32-bit crashes my ASP.NET Core web application

I have an ASP.NET Core web application which I'm trying to run in 32-bit with IIS Express. I followed other guides and tips to make IIS run in 32-bit, but every time i try to run the application it crashes with the error message:
System.BadImageFormatException: Could not load file or assembly. An
attempt was made to load a program with an incorrect format.
I have tried the following:
Set the build and debug to run x86
And unchecked the Use the 64 bit version of IIS Express for web sites and projects
But my project still closes almost immediately with the error mention above. Is there a setting that I am forgetting about or something else I need to do before the project can run in 32-bit.
I'm using visual studio 2017 on Windows 10 with IIS Express version 10.0.14393.0 and AspNetCore 2.1

How to run a .NET Core Web App on Apache without Core Runtime?

I developed a web application in .NET Core in VS 2017 for Windows. I published it on Linux Mint using the independent mode (Self-contained deployment). How to run it on Apache without installing .Net Core runtime?
With Console App (Self-contained deployment) it's possible with this Linux command ./DllName.
I found the problem, the error was caused by a Visual Studio bug that generated dll in the wizard but was corrupted. publishing the application via cmd works.

Publishing .Net core to Azure web services from Visual Studio for Mac is not working

Publishing .Net core to Azure web services from Visual Studio for Mac is not working.
Tried adding web.config but still publish failed.
I'm using Visual Studio Enterprise for Mac (updated on 11-May-2017).
But configuring Deployment options via Git from Azure is perfectly working.
I created new visual studio solution and add ONLY .net core projects.
Tried publishing into Azure and hooray! - its all good now.

Cannot run an ASP.NET Core app on IIS Express

I am working on an application using the ASP.NET Core - I am using latest update for VS2015 and Windows 10. Now I want to deploy some demo version to some other computer.
How can I host my ASP.NET Core application in IIS Express when there is NO VisualStudio installed on the other side? I downloaded the most recent IIS and Microsoft .NET Core SDK from the Microsoft's website. However, I am still getting this error in the event log:
Dynamickou knihovnu C:\Program Files\IIS Express\aspnetcore.dll modulu se nepodařilo načíst. Data obsahují chybu.
That is in czech "...the aspnetcore.dll is missing...".
The error message is definitely right, there is no such file in this folder nor in the x86 version.
Every hint how to fix it contains upgrading VisualStudio toolkit that is not suitable for me since there is no VisualStudio on target machine. If it is important, target machine is running Windows 7 or Server 2012.

Mismatch .net framework between local (Windows 8.1) and server (Windows server 2003) generating sql exception

I have asp .net 4 application running in development (local) on windows 8.1 & Visual Studio 2013, installed .net framework version 4.5, IIS Express
The production server is setup with windows server 2003 and installed .net framework version 4.0, IIS 6
The web application Target Framework is .net framework 4
Lately i have encountered SqlException (0x80131904): "Some part of your SQL statement is nested too deeply".
This exception occurs only in production (on windows server 2003) where the runtime version is 4.0.30319.1022
In development (local on windows 8.1) where the runtime version is 4.0.30319.34011 this exception does not occur.
The SQL generated by LINQ in the server is different than the SQL generated in the local.
After a little research i found that different version of .net is causing this behavior.
As far as i know, the difference between the two versions is:
version 4.0.30319.1022 is built on .net framework 4.0 and version 4.0.30319.34011 is built on .net framework 4.5
Since .net framework 4.5 is not supported on windows server 2003, I would require targeting the older version on my dev machine.
Is there a way to target my dev instance to use the exact same .NET framework version or entities dll that is used in order to receive the same behavior in both dev & prod instances?
Thanks in advance,
Shai