asp.net forms modular Design - asp.net

I have a very big Asp.net Application and it should be developed as modules so any client can Purchase the modules he needs.
The idea is to have a host application that will do the authentication and basic functions and we want to drop asp.net application inside Modules folder and we have table in database contains the menus for the module then the host display the menu (the host and module use the same database) and render the page requested.
I'v searched a lot and found solutions for MVC using Areas but nothing for ASP.net Forms . I'v tried to use MEF but Couldn't succeed.
is there any way to make asp.net forms render pages that exist in the file system but not included in the project.
please help me.

Related

Integrate CMS like Umbraco in existing application

We develop very business-case specific applications, but all applications have something in common: some pages or some parts of pages need to be freely content-managed. We often rebuild the same functionality in each application: display and editing of CMS pages.
There must be a better way! Is there any .NET CMS that can be plugged in the way we can in the main application iterate on the available pages and display them using a simple API which outputs HTML, and management of those pages is done in the backoffice / administrative pages of the CMS application.
I would imagine, for example Umbraco, which offers an extensive backoffice. You would in the backoffice be able to add, remove and edit pages. The developer would in code simply use an API like:
UmbracoCms.Core.PageManager.GetPage('CONTENTBLOCK-HOME')
This would for example retrieve the HTML content for a content block on the home page.
Does anything like this exist in the .NET ecosystem, or are there alternative solutions? The basic question is here: How would you add CMS functionality (by preference, already from a well-known CMS like Orchard or Umbraco) into an existing web application without rebuilding and reinventing a wheel each time over and which solutions already exist? What solution would allow plugging in the CMS into the existing application instead of trying to get an existing application to work in a new CMS application?
If you have properly separated application, there would be no problem to integrate it with Orchard as module.
Modules in Orchard are like MVC area so it is like subapplication.
Separate business logic, domain entities and data access to separate libraries which will know nothing about Orchard. Create Orchard module just as presentation layer and as point for registering all your dependencies in Autofac IoC which is used by Orchard.
If your application is improperly designed ... ex .. all business logic is in controller, then you are in trouble.

What is the difference between ASP .NET Web Forms Applcation and ASP .NET Web Forms Site

I need to write a simple app which will work in a cloud where I can store data about clients and it will be avaiable from Windows and Android and I assume it has to be a website.
What is the difference between ASP .NET Web Forms Applcation and ASP .NET Web Forms Site? Which one should I use?
Web Form Site is nothing more than previously called Website projects where you work with webpages which is just small php like (with Razor/aspx) script files which render as html.
Webform is more like a component oriented framework. Web Form Site or WebSite should only be used for small projects or if the project needs to be compile in C#/VB both language. Also if you want to put your all source code in web-server then it can be used. On contrary with WebForm application you don't need to put code base files to run the projects - you'd be better off only putting scripting .aspx files.
This has been explained in detail in the following question:
ASP.NET Web Site or ASP.NET Web Application?
Also, you can check out the differences between the two here:
MSDN
Regarding your first question if your app is native or hybrid then you need REST(WebApi in .net world) which any app can access natively regardless of the device and will meet your needs of the "cloud".
If you what you want is a website instead that is "viewable" by mobile devices you may want to make your website "responsive" and you can look at various bootstraps templates that can help you with that.
Regarding your second question I think it has no bearing nor it will make any difference in creating a mobile app which project type you use.

integrate dotnetnuke module in asp.net web application

i have existing asp.net web application it includes membership and roles and admin section,etc. Now i would like to integrate dotnetnuke journal module in my asp.net web application.
is it posible to integrate dotnetnuke module in my web app? i download dotnetnuke source and i compiled journal module.
can any one update me how to integrate dotnetnuke module in my web app..i don't want to switch to dotnetnuke for now.
Your best bet would be to utilize the APIs to access the journal from your custom application.
The module itself is dependent upon DNN and its context (users, pages, modules, etc) in order to function properly.
I am sure you could rip a lot of that out, but I am not exactly sure what you are trying to do.
is it posible to integrate dotnetnuke module in my web app?
No.
Your only way to succeed in your quest would be to convert your ASP.NET application into the DotNetNuke application. To do that, you're going to have to merge the authentication side of the two sites. This shouldn't be impossible since DNN uses the ASP.NET authentication provider.
If you can merge the user database into a DotNetNuke installation properly, you're halfway there. You could then use the DotNetNuke page management features to load your custom pages by linking to them directly, and gradually merge your existing application.
Otherwise, you have no hope of integrating the Journal module. And you're up for hundreds if not thousands of hours of coding to try and replicate it.

I'm having trouble understanding exactly what ASP is and how to upload an ASP website

As of the start of this week I've been required to start learning how to develop websites in ASP. I have a moderate level of experience with C# through XNA, so that part of it isn't much trouble for me.
I've been following a Music Store Tutorial which takes me though setting up an "ASP.NET MVC 3" application.
I'm about done with the tutorial and have a functioning site when I run a test locally, but I don't understand what files need to be uploaded. I've worked on front-end updates for ASP websites before but they were completely different to this in terms of what files made up the site and so on.
I don't see a single .aspx page in my project which is what I assumed an ASP site was made of from experience. I'm starting to think that those projects weren't MVC projects but maybe just the "ASP.NET Web Application" style project.
Are ASP.NET and ASP.NET MVC different? From what I vaguely understand, MVC is just a framework that wraps ASP.NET? Also, is ASP something or is that just a synonym for ASP.NET? Finally back to my initial confusion, what files are to be uploaded onto the server when I want to launch an ASP.NET MVC project?
Do I just upload this entire directory and the server will handle it in the same way that the inbuilt testing ASP server does? Or is the site compiled down into a couple of files somehow and I just upload one of these directories (I think I read that somewhere).
ASP is an acronym for Active Server Pages. Pre .NET, ASP was Microsoft's first iteration scripted web pages. All of those pages typically ended with the extension .ASP.
When .NET was released, ASP was overhauled significantly and renamed ASP.NET. The new version of ASP.NET attempted to model web development similar to windows application development, where you used controls and an event handling model. That was Microsoft's primary model for web page development for many years, and it still around and supported, but today it is referred to as ASP.NET Web Forms. ASP.NET Web Forms pages typically have the .ASPX extension you mentioned.
In the mid-2000s or so, Ruby on Rails took off, using an MVC based model for developing web applications. A few years later, Microsoft released an alternate version of ASP.NET, called ASP.NET MVC, which used similar concepts. Many people feel the MVC approach is a more natural method for developing web pages than the web forms model (note epic Q/A threads on this very site a few years ago). In any case, ASP.NET MVC shares parts with ASP.NET Web Forms, but looks and works pretty differently; for one thing, there are no .ASPX pages as MVC, for the most part, uses a different form of routing to determine what to display.
That's a very brief history that glosses over a whole lot of subjects. What you've posted a screenshot of, is an ASP.NET MVC project.
As far as publishing is concerned, the typical route for publishing an ASP.NET website is to open the project in Visual Studio, select Build|Publish, and tell VS where to put it. Depending on what method you use, you may have to do additional configuration in IIS on the box where you published the site.
First off, when you say ASP, you're referring to old (obsolete) tech. ASP.NET is specifically what you're referring to in your question.
ASP.NET is a Microsoft technology which works cooperatively with the IIS server to provide a "Windows Application" type experience with web sites. Your web site logic is compiled in to a .NET DLL "Class Library." When a web request hits IIS with a URL matching your application directory, IIS starts up your application internally and maintains it.
I don't understand what files need to be uploaded
Visual Studio actually has a built in publisher available for your use. See the Build -> Publish menu in VS / Web Developer.
I don't see a single .aspx page in my project which is what I assumed an ASP site was made of from experience.
ASP.NET Web Forms uses the aspx extension for Pages, their frontend rendering component. On the other hand, ASP.NET MVC uses the concept of Views, which are not relient on a specific component. See the next paragraph.
Are ASP.NET and ASP.NET MVC different?
Yes. No. Maybe. ASP.NET contains all the "magic" which allows IIS - the web server - run the web application and serve up web pages. Volumes could (and have) been written on this. ASP.NET also supports much configuration through the means of Http Modules and Providers. These components are declared and configured through the web apps web.config file and are typically automagically created and persisted by IIS and ASP.NET. They collectively make up the glue that makes ASP.NET just work out of the box.
MVC was built on top of the existing foundation classes of ASP.NET. Some features have been loaned, a few have been replaced and more than a handful have been created in order to support the model-view-controller pattern.
For example, MVC gives us support for View Engines - a runtime library which allows us to write our Views (web pages) in a particular format. The ASPX View Engine existed during MVC's launch. Later came Razor, employing the .cshtml extension. Users of the MVC Framework have implemented a wide variety of their own view engines as well. This is possible due to the modular nature of ASP.NET and MVC.
Do I just upload this entire directory and the server will handle it in the same way that the inbuilt testing ASP server does? Or is the site compiled down into a couple of files somehow and I just upload one of these directories (I think I read that somewhere).
I would recommend using the Build -> Publish menu in Visual Studio. You may use web deploy if your host supports it, but FTP and File System methods are available as well.
The bin folder contains the class libraries required to run your web application on the server. The web.config file provides the configuration to do so. However your Views are not compiled in to the assembly. They are published as-is and are rendered lazily by the view engine.
You are probably familiar with ASP.NET WebForms, this is an MVC project. You can find more here:
ASP.NET MVC
In order to upload the site, you need to publish the website from inside Visual Studio to a local file location and then upload everything to the website.
If the target server doesn't have MVC installed, you can right click on the website project in Visual Studio and select "Add Deployable Dependencies".
This will ensure that the server has all the required files to run an MVC project.

VirtualPathProvider Not working in asp .net website project

Here is the scenario :
1) Created on Web Application project for reusable user controls
2) Created Main application where i want to load these controls dynamically (definitely from assembly)
The above scenario worked wonderfully well, as i have selected web application project for main application
but now i want to use same reusable control project in asp .net website project but its not working, it is providing me error like
The virtual path '/App_Resource/ReflectionControl.DUControl.ascx' maps to another application, which is not allowed.
Below is the steps which i have followed to do it...
Link
I have identified the issue... "/App_Resource/ReflectionControl.DUControl.ascx"
Here You need to provide path like "~/App_Resource/ReflectionControl.DUControl.ascx"
So, "~" was missing...it rocks.

Resources