How to look at asp.net .cshtml files in browser? - html

I've never touched asp.net or .cshtml files before. I have provided the file structure. What do I have to do to run the files and view them in my browser like I would with regular html files and live server on vs code? Do I need to write a script?
I tried opening it with live server, making an express server file, running dotnet watch run and dotnet run in the terminal after installing the necessary asp.net files, and dragging and dropping the files on to my browser but all that came up was the code.

Well, be it MOST web pages with code behind, opening the source code page or file means next to nothing.
You need to be running a web server, and one that can consume + run the code behind. When that code runs, then a page is spit out with standard HTML, but those pages have LITTLE use by just opening. You need a working + running web server for those pages to work.
Thankfully, Visual Studio has a built in web server when you install it.
So, to view that page?
you have to open it from/with Visual studio. You can then hit f5, and the code will compile, then IIS (the web server) will be launched, then the .net code behind will run, render the page, and spit out standard HTML.
however, those aspx pages, or cshtml pages? They don't work alone, they required a web server, and one that can run + consume the aspx, or cshtml page. Only have the .net code has run, and THEN can the web server in question render the page, and then crank out standard HTML compatible pages that work on any computer.
So, you need visual studio here. And you then open that page with VS, and then you can say start debugging and run the page by hitting F5.
You need to open the project here - not just the one page.

Related

Setting up a Grails / Groovy Server Pages project on Visual Studio Code for MacOS

I have some HTML/CSS changes I need to make on an existing project for a client. I already cloned the repository on my machine but I'm not really sure how to set it up to view the changes locally.
I'm seeing lots of files with the .gsp extension and after some googling I discovered those files mean this is a Grails/Groovy Server Pages project, which I have zero experience with (I'm a Front End Developer btw)
I already located all the HTML/CSS code I need to change, so what I need to do is learn the basic commands to get the project running locally so I can view the changes after I make them before pushing to the actual repo.
Anybody has an idea on how to set these kinds of GSP projects up on Visual Studio Code for MacOS?
Any help would be very much appreciated!
I think the easiest approach for you would be to start Grails separately using the command prompt. Identify the version of Grails for your project, and follow the instructions from Grails to setup the dev environment.
Also, remember you probably also have some sort of database to install and initialize.

How do I debug apps using angular+bootstrap (front end) + IIS (backend) from Visual Studio?

Specifically, I want to debug the front end without having to stop and restart the server for every change. I am used to doing it when the pages are not served by the development IIS, but I don't know how to do it when they are.
For instance, is you edit an html file in the filesystem it will be updated automatically in the browser.
Thanks.
For html changes you don't need to restart the website. Run your browser in developer mode (press F12) that will force it to get a fresh page each time. Then press F5 to reload your browser and you will pick up the html changes.
Unfortunately, for jscript changes, you will need to restart the website from Visual Studio press Ctrl + F5 to restart the website in Visual studio (without debugging visual studio debugging - you can still use browser debugging). At this does not restart the whole of IIS, just the website.

Win 10 UWP App: Unable to upload app package to Windows Store

I am trying to deploy my windows 10 uwp app to the windows store. I got a validated developer account and everything set up. My app packages have been built and passed all tests of the testing kit. Now I am trying to perform the last step: uploading to the store.
The problem is, that the "Upload App Packages..." is greyed out! I tryed to clean the project, selected the project to no avail.
Has anyone got an idea what the problem might be or how to further debug it? As there is not error message I am not certain what is wrong in the first place...
Thank you!
According to the documentation, this option merely opens the Dev center dashboard. Save yourself the trouble and open it directly in your web browser: https://dev.windows.com
To be honest, for some reason I don't even have this option in my Visual Studio (maybe it was removed in VS 2015?). I've always generated the packages from VS then uploaded them with the web browser, without any trouble.
Goto in Release Configuration and Check .net native tool chain and optimize code then create app package again (Don't forget to associate app to store first)

vb Could not load file or assembly Mysql

I made application in vb 2010. And everything works great at mine computer. I made release and publish the application when i sen!
Pictures
Could not load file or assembly Mysql...
Also is there any way i can put net framework 4.5 to be installed with my application ?
You can include NET Framework by the following way. At least in Visual Basic 2010...
Through Project Tab you open Project properties.
Then in Publish Tab you Click Prerequisites Button.
There you can select the things you want to diistribute and the way they will be distributed.

(IIS) 7 Configuration - Visual Web Developer

I develop small web base ASP applications that basically store and display data from a backend MsAccess database.
The application websites are developed and tested on my local machine (the finished work eventually gets published to a company web server).
To run the development web server on my XP machine I did not load any additional software. I believe that I was running IIS 5 ? and this setup was running 100%.
I just loaded a Visual Web Developer – Express Edition to help my development and this after two hours of installation time it appears that it gave me an upgrade to my IIS (to version 7) without notifying me if I wanted to load that.
Now all the development .asp pages on my machine no longer run.
Note: the initial pages appear but anytime I hit a “submit” button I get the error:
destination page can not be found or is no longer available
Is this a IIS 7 configuration issue?
Where do I go to change the configuration ? what needs to be changed to get a .asp page to “post”?
Can I Uninstall the IIS seven and get back to the older version if IIS ?
on IIS7 ASP is disabled by default. you need to activate that in the IIS7 config. I belive it is an ISAPI Module.
Which version of Windows XP are you running? If you have anything below Proffessional, you probably got upgraded to II6 and not II7 - there is no II7 for lesser versions.
Moving on to what to do if you have II7. (I'm running Vista, but I believe these configuration tools look roughly the same).
Open the IIS Manager from Administration Tools (under Start/Programs)
Expand your web server (the node with your local computer name), then expand Sites and select the site you want to activate ASP for.
Under "IIS" there is a setting called "ASP". On the right hand side of the configuration tool there is a bar with labeled "Actions" - I believe you need to find the Start option under Manage Web Site.
IIS is part of the OS. So unless you upgrade your OS, it will remain the old version.
If you are using Windows XP 32-bit, then IIS 5.1 is there.
If you are using Windows XP 64-bit, then IIS 6. is there.
One point is that Visual Web Developer is for ASP.NET development mainly. So if you are developing classic ASP, it does not help much.
If now all your classic ASP pages fails, can you test with a simple hello world page? If you can see that page without a problem, then actually IIS serves ASP without a problem.