.NET Blazor and client-side debugging? - asp.net-mvc

Is Blazor client-side debugging possible or what is that experience like?
Blazor is new to me. I've used Razor / MVC significantly in the past but moved on to other technologies. Checking it out now, Blazor is definitely an improvement and seems to replace Javascript with dot NET. One of the things mentioned is it can run on the browser. My question then is: how is the client-side debugging experience in Dev Chrome Tools?
One of the Blazor videos in checking out:
https://www.youtube.com/watch?v=Z0c7d64W-B8&list=PLcYfGPOcgilkwLcDgXrOoqvTd-2ettqED

Your browser's developer tools aren't going to be particularly useful when debugging Blazor apps. Here are the types of messages you'll see in the console.
The code running the browser is WebAssembly, compiled from C# or other .NET language. WebAssembly is binary, so you're not going to be able to debug that in your browser. Instead, you'd want to debug the .NET language in an IDE (Visual Studio, VS Code, etc.).

Related

Syncfusion Essential Studio in Azure WebApp (ASP.NET MVC)

when I publish my application on Azure as WEBAPP, it loads everything correctly but I do not see the components of Essential Studio such as: PDFViewer, Menu, MarkEdit etc. but in the DOM Explorer of Edge I still see the correct scripts of Essential Studio.
How can i solve this problem?
(The application is publish on Visual Studio 2017 (ASP.NET MVC))
Thank you.
Perhaps you did not include the required scripts or themes for rendering the control. Make sure that ScriptManager is included in _layout.cshtml page for rendering the controls, if unobtrusive mode is set to false in web.config file.
If unobtrusive mode is enabled, make sure that ejUnobtrusive.js script is included for rendering the control. Once the previous steps are ensured, now check whether your application run as expected in local before publishing.
If the application runs fine then make sure that there no compilation errors after publishing. Take a moment to look at the Deployment of ASP.NET MVC Syncfusion controls to Azure KB article for more information. If you face any compilation errors or console errors, provide us the details on the issue along with screenshots or video. It will help us provide solution.

I need to deploy source ASP.NET MVC code on Azure websites, and for it to run

This may be a terribly simple question, but....
I am using MVC3, Razor, C#, ASP.NET4.5/SQL Server 2008 and deploying to Azure Websites & SQL Azure.
I need to copy all of my source code, without compilation, from my web application ie model source, class libraries and views. All additional projects such as Entity Framework DAL projects will remain as a DLL. However I do not wish to have a web application DLL since I need to edit C# code in situ, and have the site run using this code, no doubt using the JIT compiler.
The main reason is because I am doing some integration work and the 3rd party site sends a return url back, and "Localhost" is not very accessible to the outside world, so wish to use my Azure website instead.
So can I copy my web application code as source, and if so is it a matter of copying all the C# files up and removing the web application DLL?
Thanks in advance.
EDIT
Further thoughts. Azure Websites provides a container for the Worker process to operate which hosts the Application DLL which is P-Code which is then dynamically compiled to native code. So I am not sure if one can start with a source C# file like one can with a Razor View.
EDIT2
Or do I need to make the changes on my Local machine and keep republishing to Azure Websites to test the integration? A little long winded...
MVC Sites must be Web Applications, they cannot be on the fly compiled. Sorry, there is no way around this. You must compile your code into a DLL for it to run if you want to use MVC.
The reasons for this are many, but a big one is that the "on the fly" compilation model used by ASP.NET Web Site projects does not use namespaces, and namespaces are very important to the operation of MVC.
Another issue is that MVC depends heavily on static assembly references, which is also not the case in Web Site projects.
In general, ASP.NET Web Site projects are poorly supported, have a lot of issues that make them unsuitable for larger projects, and even more unsuitable for use with more advanced frameworks.

ASP.NET to Mobile

Right now I am developing a website in visual studio using ASP.NET and C#. Is there any easy way to turn it into an application where iPhone users can get it on the app store. I heard something about Xamarin(monotouch), but I did not really understand exactly what it did.
No. Xamarin is a framework that lets you write Apps for iOS and Android using C# and accessing the native API frameworks. It does not allow you to simply port any .NET app to a mobile platform.
You can use responsive design to allow your ASP.NET site to work with both desktop and mobile browsers. See http://www.asp.net/mobile
As Jason wrote Monotouch enables you to build native applications. If you would choose a single page application approach you would be able to put the output in PhoneGap to publish it to the AppStore/Google Play.
That requires a bit of different thinking and doing, as you can't rely on the classic model with controllers/views and hard links.
However, it is still possible and I did it already for a project. I have an ASP.NET MVC application with Razor etc. as foundation, so I can easily manage the different "pages", dozens of different script files etc. However, all pages are Parial Views rendered within one single page. The nice thing about is, that this application works in each browser and is testable, too. To get it additionaly in an app container, we wrote a little tool that grabs all the output of that single page and converts it to a static HTML file, copying and referencing all the images, stylesheets and scripts, too.

Solution for web designer using an OSX to develop an ASP.NET MVC project?

The project is developed using ASP.NET MVC framework and heavily relies on .NET 3.5.
What would be the best solution to allow a web designer, who is using OSX, to develop the site's UI? Basically he would just need to edit the aspx, css and js files, but also run the web application locally.
I've thought of some possibilites:
Install parallels/vmware/bootcamp and set up everything as you would for windows. Bad: it would be slow, OSX user doesn't like working in windows
Set up Mono and run the webapp on that. Use whatever tool you want for editing the front end files. Bad: does mono support MVC framework, .NET 3.5 and database connections? Unfamiliar platform, so possibly a lot of work setting it up, if it even will work.
Run the site on a separate server, and edit the front end files via network drive. Bad: our development server is so slow that seeing the changes takes too long...
Do you have other ideas or comments for these options?
Thanks!
You could try using a virtual machine. VirtualBox is a free one and is quite simple to setup. The only downside is that you need your own copy of Windows...
What you really need to do is have your web designer mock up the pages in static HTML, CSS, and JavaScript first (in their environment of preference.) Once that's done, adapting the markup to the ASP.NET project should be easily doable by yourself or the designer on a Windows machine (or virtual machine, your preference).
The MVC framework is part of Mono. Ares Technica has an article about the MVC framework and running it on Mono.
While it seems that some people were able to hack the framework to work on Mono back in March and April of this year, Microsoft has since released the MVCframework as open source and it is now fully supported by Mono as of the 2.4.2 release.
Here is a link to the most recent Mono releases along with Virtual Machine images that already been pre-configured to give you the best development experience.
Good luck with your project and hope this helps some.

Asp.net mvc in MS Expression Web (and other web editing tools)

Today I gave in to all the banners asking me to test MS Expression web 2 demo.
After some setup hickups I fired up the thing and immediately encountered a problem:
How do I make this tool work with my asp.net-mvc projects? Actually, how do I make my websites work with ANY tool but visual studio 2008?
Untill now I did everything with VS2008 / Notepad++.
Does anybody have experience with using asp.net-mvc projects in tools like dreamweaver, expression web etc?
You can use any web tool to edit the HTML+CSS+Javascript side of the site, but you'll need to compile it with VS2008 or MSBuild to run it.

Resources