ASP.NET MVC Website first start - asp.net-mvc-4

Hello i am currently learning ASP.NET MV4 with Visual Studio 2012, i created a new project, not an empty project, an internet application but anytime i try to run it i keep getting an error.
There is no much else i can say about this, i am just now learning ASP.NET with Razor.
I would very much appreciate some help on this. The error itself seems to be originating from my machine.config file but i'm kinda afraid of opening that file.
This is the error:
http://prntscr.com/3a6ltl

Add MySQL.Web as your reference with NuGet Install-Package MySql.Web.
Or remove the red line from your machine.config if you are not going to use the MySQL Membership provider
It is located here: c:\windows\microsoft.net\framework\v4.0.30319\config\machine.config

Related

Asp.net Core application is not running with VS 2017?

I have installed the visual studio 2017 for ASP.Net Core. I created Dot Net Core project. Build it successfully and run it but on Firefox it shows the blank page and on chrome it shows "**The localhost page isn’t working
localhost is currently unable to handle this request"
I thought there is a problem in code. I debugged the code and there is nothing wrong with the code. It's the default template and code generated for Asp.Net Core. I googled and tried many things like restart the VS, removed cache, etc but nothing worked for me. Then i uninstalled the VS 2017 and used C Cleaner to remove all temp files etc and installed the visual studio 2017 again but the same error came again. Then i created MVC application, console application in VS 2017 and both worked fine. Issue comes only in Asp.net core application. I use fiddler to see the request status and it is 500. I debugged the code but nothing wrong with the code(No Exception). I have tried many things but did not find anything helpful. Can anyone tell me what's the issue?
The blank page response can be caused by a number of reasons. Sometimes because you are lacking something in the system , routing issues, wrong code on the wrong location, .csproj configuration issues, permission issues, and many more.
There are a couple of things you can try:
Check to see if you have the appropriate ASP.NET Core Module installed in you system. (Either x86 or x64 depending on your system )
Make sure you have enabled IIS Integration in your code
See if you have the error middleware in your Configure code, it mostly helps to solve your issues by giving full detail.
Looks like you are running into error similar to this issue with browserlink .What version of browser link package do you have in your machine
Microsoft.VisualStudio.Web.BrowserLink should be 1.0.1 referring the templates
This SO post discuss the similar issue .If that does not solve, Please make sure you have 1.0.1 in your project referenced and then try this
Clearing your NuGet cache
dotnet nuget locals all --clear
Set Environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to 1 . This is to avoid caching packages
dotnet restore
Does it happens to be runtime compilation issues?
I stumble across this issues log while studying the feasibility of using ASP.Net Core for ERP System host on LinuxOS.
Issues #2017 on GitHub
Try setting
<PreserveCompilationContext>false<PreserveCompilationContext>
in your csproj

The type initializer for 'PayPal.Manager.ConfigManager' threw an exception >Paypal SetExpressCheckout

for some reason I am getting an error "cannot read config file" when trying to set the SetExpressCheckout, I have copied across the web config settings, but for some reason I cannot read them, the error isn't very helpful other than what I have mentioned.
I am using mvc4, and to be honest I have had a problem reading the web.config in the past..
any suggestions would be much appreciated.
Just looked at this... thought it might help someone. Looked at the Inner Exception, saw it was looking for the Log4Net dll... so I gave it to the app and hey ho. It worked.
I had a similar problem and ended up getting both the core and merchant sdk source from GitHub. Change the SpecificVersion=True to False for the log4net reference in the core sdk and re-build it. I also re-targeted both for .net 4.0 so I re-built the merchant sdk with a reference to the new core sdk. Import both of these new dll's to your main project and you should be good to go. I had to change the config in 1 place for the section handler.
<section name="paypal" type="PayPal.Manager.SDKConfigHandler, PayPalCoreSDK"/>
since the Assembly name does not have the underscores if built from source (vs downloaded or added via NuGet).
A bit of explanation:
I was already using log4net version 1.11 before adding the sdk. The sdk was looking specifically for version 1.10. these 2 versions have a different public key, so 'simple' binding redirection won't work. If you have a reference to a different version of log4net (for example using ninject logging extensions requires min version 2.11 so these 2 ninject and the paypal sdk, are incompatible off the shelf).
so the root of the problem was actually caused by the dll version issues but manifested as a Configuration exception. check the inner exceptions and see what you get.
ok, just a quick update, I think it must be something to do with MVC, I have created a new empty asp project, copied the sdk config details across, created the same function call as I have in my mvc code, and called it from a simple asp button... and it works ??
does anyone have any ideas why I am getting an error in an mvc4 project, and not in a simple asp project ??
any help or ideas would be much appreciated.

MVC4 - AuthConfig.cs missing

I am trying to get started with the OpenAuth features of MVC4 as described here:
http://pluralsight.com/training/Player?author=scott-allen&name=mvc4-building-m7-security&mode=live&clip=9&course=mvc4-building
I already did start over again a couple of times in order not to miss anything, but even though I am choosing the right template (Internet Application) there is no AuthConfig.cs.
Nor do I find documentation what to do to get the required tasks done manually.
I am pretty sure this is a pretty dumb question, but maybe I don't find the answer because it is so obvious...
thx
I followed these steps:
Open File/New/Project
Select ASP.NET MVC 4 web Application
Then Select internet Application
Once the project was created there should be a AuthConfig.cs file within App_Start folder
unbelievable.. I used the RC Version of Visual Studio and even though I reinstalled MVC4 from scratch the recent version including the openauth extensions wasn't properly available.
Following the same steps on the regular Visual Studio Installation did the trick...

NServiceBus - "project type is not supported" error in Visual Studio 2010

Installation of NServiceBus was smooth and straightforward. No issues there.
Now, I'm trying to play with a sample solution to see what happens behind the screens. Just trying to follow instructions here - http://docs.particular.net/samples/
And I get this error when creating an endpoint.
Reinstalled the VS add-in. Restarted VS 2010. No luck.
Any ideas?
It seems like you don't have the ASP NET MVC 3 project type installed on your environment. Please try installing ASP.Net MVC from http://www.asp.net/mvc/mvc3
If you have tried to install it using the Web Platform Installer Tool, be sure that you installed the right version and product (At least for me, it's easy to pick the wrong one with so many similar named products).

Error when creating Azure ASP.NET MVC4. roletemplatedata.xml file cannot be found

I installed VS 2012. I am trying to create a new Azure project with MVC4 Web Role. When I press ok, I get this error:
The project template references by the roletemplatedata.xml file cannot be found
I found something similar used to happen with MVC2 a few years back.
Is anyone else having this issue ?