MVC :: Publish Seperate Areas - Session Gets Kicked Off?
Nov 26, 2010
If we use the new MVC 2 feature Areas, can we publish each area seperately without affecting the other,Currently my project has different folders for different controllers, but when i publish as it is in same dll, if an user is using a functionality, their session gets kicked off, what should i do to avoid this and publish seperately- controllers, views and its code.
View 2 Replies
Similar Messages:
Apr 29, 2010
Here is what i would like to be able to do with the urls/routes:
1) www.domain.com/customer/home/index
2) www.domain.com/home/index
Where both the home controllers should be seperate controllers with seperate views and the company part should be an param for all the actions in the controllers.Now why i want to be able to do this is because of the following scenario: Each customer will have there own pages (which actually will all be the same for each customer but with different information per customer). The one without the customer is the general website where non customers can go to to become an customer or get information about the services we provide for them, they can sign up etc.
View 5 Replies
Feb 20, 2011
I'm using MVC 2, I need to change the default name "Areas" to <MyOwnAreaName>.
Is't possible to change default name "Areas" to my own name?
View 1 Replies
Aug 5, 2010
msbuild /t:publish [use PublishProfileName] someproject.csproj
View 2 Replies
Nov 21, 2010
I would like to create a script that does some actions, then publish the site to the production, and then runs another script.Is that possible in VS2010?
View 2 Replies
Jan 17, 2010
i have doing a video stream project,so i am facing a probrem while i encode the video.
after the user upload the video,i call a funtion continue after the video complately uplaod.
the problem is while the server side encode the video,i make the use have to wait at that page until the video is complately encode. is that any posible to seperate the upload and encode running?is that using
i wish to do is after the user upload the video,it can free using the webpage again .and in the same time the video is undergoing encoding trigger by video competely upload at the server side.
View 3 Replies
May 20, 2010
I have 2 ActionResults both called Create which basically create different things on a model. Is there a way to have overridden action results? - I dont quite follow routing and not sure how to do what I'm trying to do.When creating A i call :-
AcceptVerbs(HttpVerbs.Post)]
public
ActionResult Create(ProjectModel
[code]...
View 1 Replies
Jan 24, 2011
I'm following this blog post about setting up ELMAH with MVC: [URL] I've only done part 1. Everything works correctly if I simply go to the Home controller, and then cause an error. I can view /elmah.axd as well, and my errors are logging in the database correctly.
However, I've added an area to my application named Admin. If I navigate to /Admin, I receive the following error:
System.MissingMethodException: No parameterless constructor defined for this object.
public override IController CreateController(RequestContext requestContext, string controllerName)
{
var controller = base.CreateController(requestContext, controllerName); //Error here
var c = controller as Controller;
I'm assuming this has something to do with my Area.
EDIT for jfar:
For instance, I have an Employees controller in my Admin area:
public class EmployeesController : Controller
{
private IEmployeesRepository employeesRepository;
public EmployeesController(IEmployeesRepository employeesRepository)
{
this.employeesRepository = employeesRepository;
}
//...
}
View 1 Replies
Apr 14, 2010
To use separation of concern and to optimize the clearness of the controllers we decided to split each action of a controller into different controllers (FunctionalLocationEditController, FunctionalLocationCreateController and such).
Problem now is the Global.asax is currently a bit big for just a few pages registered in routes.
We would need to use an area type of mechanism but for business reason we are not ready to upgrade just yet to MVC2.
Basically, is there a way in MVC1 to map the Urls to something like <folder>/<controller>/<action> ?
View 2 Replies
Jan 18, 2010
Been starting a new project (MVC 2) based on the first version of the same application (MVC 1).In the first we breaked out Controllers and Views into seperate projects, which resuted in a clean and organized structure.Now with version 2, I've been reading about this "Areas".Keeping the old structure and using areas sounds like overkill to me. Keeping the old way OR use Areas is what I'm trying to decide on.Just wanted to hear your thoughts about this.... Is it really that usefull (ie have other benifits)? No use to make some major changes just because something is there IMHO
View 3 Replies
Sep 2, 2010
I am wondering if MVC offers a handy function to iterate through all areas. I know I can search the sub-directories of Areas to achieve this. I am just curious.
View 3 Replies
Jan 14, 2011
I have a asp.net 4 web application. I am doing some SEO and performace tunning. I noticed that ASP.Net generates a lot of scripts on the fly, eg for validation and AJAX
is there any way these scripts can be put into a seperate file so it makes more code more relevant to content and reduces page size?
View 3 Replies
Feb 27, 2011
I am fairly new to jQuery. All the examples that I find online and in the book that i bought refers to the functions that you declare in the web page <head></head>. Nowhere can I find a good example of how i can use an additional .js file to hold all my jQuery functions in. like normal javascript functions that you use, you reference the external .js file in the <head> and then you are sorted.I hope i am clear enough. Can someone please give me detailed steps on how to get this done? I am alwys on the lookout for best practices and know it is better to keep the code seperate from the web page.
View 3 Replies
Feb 17, 2011
Does the current MvcRouteHandler support something similar to Monorail's concept of an controller area? a way to group the controllers.
View 1 Replies
Jan 29, 2011
I'm starting a new ASP.NET MVC project, and I decided to put my controllers in a different assembly. Evertyhing works fine, but I have hit a problem: I created a new area in my MVC Project, called Administration. I have an AdminController Class in my seperate assembly which is supposed to return views from my Admin area, but everytime it tries to return a view, it looks for it in the wrong place (~/Admin/SomeView.cshtml Instead of ~/Administration/Admin/SomeView.cshtml) How can I tell the controller to look for views in the wanted area?
View 1 Replies
Mar 5, 2011
is there some way to share a partial razor view between areas? For example a login partial, it is found if i use @Html.Partial("_LoginPartial") but the URLs Html.ActionLink generates are local to the calling area (even though the partial itself is not part of the area).
_LoginPartial.cshtml is in /Views/Shared/_LoginPartial.cshtml
Calling view is inside /Areas/Somearea/Views
Links generated are like: [URL]
But should always be: [URL]
Partial view source:
@if(Request.IsAuthenticated) {
<text>Welcome <b>@Context.User.Identity.Name</b>!
[ @Html.ActionLink(@Messages.Logout, "Logout", "Account") ]</text>
}
else {
@:[ @Html.ActionLink(@Messages.Login, "Login", "Account") ]
}
View 1 Replies
Feb 12, 2011
If I create an Area, does it have to reside off of the root? Or can I create it in a sub-folder? If so, how to you set the MapRoute so you can navigate to rootSecureAreasAdmin?
View 9 Replies
Jan 16, 2011
I created an Area in my application named Admin. It's pretty basic, looks like this:
Areas
Admin
Controllers
CompaniesController.cs
Models
Views
Companies
Index.aspx
AdminAreaRegistration.cs
When I try to view my Index page by going to /Admin/Companies, I get a "The resource cannot be found" message. I find it weird that I don't get any sort of error message.
View 1 Replies
Feb 7, 2011
Where should I put my common _layout.cshtml file for all of my Areas?
View 4 Replies
May 16, 2010
I am adding a 2nd web site to our pubic server and am noticing the SMTP delivery trying to use the default SMTP Virtual Server which is set up for the 1st web.
I created a 2nd virtual server with new smart host and credentials for the new site but need to modify the config file.
I tried using the host name = smtp virtual server 2 name.
Both webs use relay to a host for delivery
Here is my config file
<mailSettings deliveryMethod="Network">
<smtp from="admin@xyz.com">
<network host="xyz.com" />
</smtp>
</mailSettings>
I figured it out. Sometimes you just have to ask someone the question. I changed the network to IP address 192.168.56.11 instead of name of server.
ie <network host="192.168.55.11" />
View 1 Replies
Aug 24, 2010
I want to structure my ASP.NET MVC 2 web application sensibly using Areas. The application consists of the two main parts Website which is the default part and Dashboard which administrates the site using a CMS. (Probably, more Areas will follow later on.)
How do I structure my project best? Should I ...
create the Area Dashboard and put the stuff belonging to the Website part into the main application folder or should I create both Areas Website and Dashboard?
Additionally, where should I place my Entity Data Model and the corresponding Repository classes that have to be accessed by both Areas?
View 1 Replies
Feb 6, 2011
I have two areas: Frontend and Backend - I would like to have two different error pages - so I have two files NotFound in /Areas/Frontend/Views/Shared/NotFound and /Areas/Backend/Views/Shared/NotFound. I have added also to Web.config in area Frontend:
<customErrors mode="On" defaultRedirect="Error">
<error statusCode="403" redirect="NoAccess" />
<error statusCode="404" redirect="/Areas/Frontend/Views/Shared/NotFound" />
</customErrors>
and in area Backend in Web.config:
<customErrors mode="On" defaultRedirect="Error">
<error statusCode="403" redirect="NoAccess" />
<error statusCode="404" redirect="/Areas/Backend/Views/Shared/NotFound" />
</customErrors>
But when I come in bad website url - for example: http://localhost/Backend/blablabla I don't see my NotFound website but:
Server Error in '/' Application.
The resource cannot be found.
Description:
HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Backend/blablabla
View 3 Replies
May 8, 2010
In my application I have controller named `Snippets` both in default area (in application root) and in my area called `Manage`. I use T4MVC and custom routes, like this:
routes.MapRoute(
"Feed",
"feed/",
[code...]
View 2 Replies
Apr 30, 2010
I've got IIS 6 with a self-signed certificate installed. This is now securing the whole site (all urs are HTTPS). How do I only apply HTTPS to logged in areas, leaving publicly viewable data with HTTP?
View 8 Replies
Feb 4, 2010
This page is a directory search, it has controls identified by record ID, however there exists a situation where there can be more than one result with the same record ID, thus making .NET barf. I had originally implemented a check that just didn't put the control on the page, if it was already there, but we've been getting negative feedback.
My question is this: Is there a way to put the same control in two places at once, for instance having if a user checks one, the corresponding one checks as well? I'm not terribly well versed in how .NET behaves, but I'll try to provide as much additional context as possible, if needed.
EDIT: Here's the updated code that generates the controls by looping over a datatable of results
Dim cbxSendInfo As CheckBox
Dim strCheckboxID As String = "cbxSendInfo-" & drOrganizer("ID") & "-" & i
Debug.text = Debug.text & " Loading Checkbox (" & strCheckboxID & ")...<br />"
cbxSendInfo = New CheckBox
cbxSendInfo.ID = strCheckboxID
cbxSendInfo.enableViewState = true
And here's the code that finds the controls and builds the contact list:
Dim strCheckboxID As String = "cbxSendInfo-" & drOrganizer("ID") & "-" & i
Dim cbxSendInfo As CheckBox = Me.tblResults.FindControl(strCheckboxID)
If cbxSendInfo.Checked Then
alOrganizers.Add(drOrganizer("ID"))
End If
Where drOrganizer("ID") is the record ID, and i is the result record number.
I know this is a terrible way to do this, at least from my background, but like I said, this is inherited code that's been hacked to pieces.
View 4 Replies