I am trying to create an Area for running DynamicData with scaffolding as an administration part. It's probably working as it should but I can't get the routing to work.
In my global.asax I have the following function to register the routes:
[Code]....
Unfortunately the "best" thing that happened to me so far was that when I check the default tables I get a message about (MetaModel.VisibleTables)
[Code]....
The problem is that I don't know why this is. Is it the routing or something else? Is it perhaps some security thing or can I not put dynamic data inside an area?
The DynamicData folder itself is located in the root of the application since that is the convention it uses and I have no intention to override that.
I am learning MultiView control.Here are question:I added 5 views in the MultiView but all views are tight together. I can not drag and drop another control such as text boxes or labels into view area.
When i tried to implement form authentication in various subfolders i am getting an error as follows:it is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
I am developing a restful web api using asp.net mvc and trying to extend the MVCWEBAPI project on codeplex that i took from here - http://code.msdn.microsoft.com/MvcWebAPII have added a folder nested within API folder inside the Controllers folder.This path does not work - (nested folder Security)http://localhost/API/Security/Authentication/LoginAlthoug, this path works - (not nested)http://localhost/API/Media/GetMediaThe folder structure is Controllers ->APIWithin API folder I added a Security folder and then added AuthenticationController under it.To make the routing work, I updated global.asax.csBelow is the required code.
public static void RegisterRoutes(RouteCollection routes) { var map = new NameValueCollection();
I've added a .ascx control in a Master Page in the site's root. It is perfectly shown when the page is in the same master page path (in the root in this case), but when the page is contained in a subfolder, the component isn't displayed.
test my site using a test folder called /testing...
Suppose i have the following files:-
MasterPage.master
Default.aspx [code]...
When i put ALL these files/folders into a folder called "testing" i get an error something on the lines of "MachineApplication etc..", I suppose a lot of people have had problems with this.
But how can i run the site on using a test folder like i want?
I have an MVC view that contains a number of partial views. These partial views are populated using partial requests so the controller for the view itself doesn't pass any data to them. Is it possible to reload the data in one of those partial views if an action was triggered in another? For example, one partial view has a jqGrid and I want to refresh the data in another partial view when a user selects a new row in this grid. Is there a code example for this scenario (in C#) that I can look at to see what am I doing wrong? I am using ajax calls to trigger a new request but non of the partial views are refreshed so I am not sure if the issue is with the routing, the controller,
I have a folder "hr" on my "WebApps" site. In that folder, are a severl subfolders: MS, NC, VA and so forth. Each subfolder contains a series of .pdf documents. Rather than create an .aspx page in each subfolder with a corresponding static link in a default-type page in the parent folder, I thought it would look better to set up a treeview which lists each subfolder name and, when clicked on, displays links to the files inside each subfolder. So far so good. Where it's breaking down is the actual link to each document.
Is there a way to set the hyperlink up programmatically?
new to asp.net I'm trying to dynamically delete a folder so far I have this code
[Code]....
This works well when there are no files or folders in the directory. But if the directory is not empty then I get an error. How can I delete all the files and folders within that directory
I have placed an app_Offline.htm in the root of my IIS7 application. This works for calls to pages on the root, but not for calls to pages in a subfolder of the application.
How comes? And how to make it work also for subfolders?
I have a referencing problem in my project. I have an ASP.NET application where pages are in multiple subfolders. All pages user controls are working fine.
I just want to reference a page class that is not in the root folder (in subfolder from the root folder) in my usercontrol code-behind file like this
if (Page is ar_default){ //}Where ar_default is my page class name as it is in folder name "ar"The user control is also in the same subfolder as the page being accessed.Wnen I use the same method with pages in the root folder, there is no problem at all and it is working although I notice that the classes still not appearing in the coding drop down menu but if I typed the name correctly it work.like so:if (Page is _default){ //}When using the same code with classes in subfolders it is giving this error:The type or namespace name 'ar_default' could not be found (are you missing a using directive or an assembly reference?)I'm not using any namespaces also.
I have a folder structure that is odd and I need to find a way to deal with. Example, if you go to site.com/x/y/z/, I would like to have a script in the /x folder that grabs all incoming requests, even if the request was to /x/y/filename or /x/y/z/1/2/filename. Is it possible?
I have 2 different login forms. One for the admin people and one for the customers (the forms are different as the customers need to provide extra information on their login page).
In the authentication section of the webconfig file (which is at the root of the web app), I can only specify one Login page. So how can I make sure thaf if anyone tries to access a webpage in /admin they will be redirected to /login-admin.aspx and if they try to access a webpage in /customer they will be redirected to /login-customer.aspx ?
EDITED To make issue more clear. I have also discovered this same issue with validatorcallout extensions used in a usercontrol in a root page and a subfolderpage
I have a strange issue I cannot figure out. I have a usercontrol that is used to display news story details. One of the requirements is to be able to email the story to someone. In this control I have included a modal popup to do contain the email form. What is really strange is that if the control is used in a page in a subfolder themodalpopup works as designed but when the control is in a page in the root folder while the usercontrol still works, themodalpopup control stops working.
Controls/StoryDetails.ascx
[Code]....
This control gets placed within a masterpage via a base MasterPageClass when there is a storyid in the querystring object
[Code]....
When the master page resides at the root level the popup doesn't work but in anyother folder it does work.
Or, are all the .resx files placed directly inside App_GlobalResources? If it is possible to use subfolders, how do you programmatically access resources within subfolders?
I am having a heck of a time with this. Visual Studio 2005 SP1 can not find my files and javascript files whenever I put it in the subfolders. In the solution explorer, I've created subolfders such as /js and /css. This is inside my main folder: AJAXEnabledWebApplication1css and AJAXEnabledWebApplication1js
In HTML code, when I put this: <script type="text/javascript" src="js/jquery-1.4.2.js"></script> <script type="text/javascript" src="ui/jquery.ui.core.js"></script> <script type="text/javascript" src="ui/jquery.ui.widget.js"></script> [code]...
every single one of them is highlighted that it can not find the specified file. But wait, if I add those files manually to the root folder and to the solution explorer, it is no problem!inside the reference paths for the program, I've also pointed to the root folder location:
c:document adn settingsmynamemy DocumentsVisual studio 2005ProjectsAJAXEnableDwebApplication1
Followed the code sample of Chapter 10 (Logging in) of the Book, Microsoft ASP.NET 2.0, I created an ASP.NET 3.5 website with Forms Authentication. The sample code used Website Administration Tool (WAT) to manage the users, roles, and authorization.When running in the ASP.NET Development server environment, I can first login, then click to open the links for each for the 3 roles.
However when running the sample code in the IIS server environment, I can login but can not open the links for the role subfolders.Clicking each link popped up an error message for opening a login.aspx from the specific subfolder. I don't have a Login.aspx file in each subfolder.The 3 role subfolders were configured as the virtual folders in the IIS Server. Why the sample code worked fine inASP.NET Development server environment, but got an error message from theIIS Server environment? Why an authenticated user can not open the subfolder homepage?
I have a server that has been using ARR 2.0 on IIS 7. I recently added MVC 2.0 to my ASP.NET site. After adding it the ARR routes return the following error: The virtual path 'null' maps to another application, which is not allowed. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: The virtual path 'null' maps to another application, which is not allowed. Source Error:
[Code]....
Stack Trace:
[Code]....
In my web.config I can remove the modules attribute runAllManagedModulesForAllRequests and the ARR works, but it makes the MVC routes stop working.
I created an MVC 2 RTM Project and created 2 Areas (Admin and Applicants) The code belows was added into the global.asax: AreaRegistration.RegisterAllAreas(); I also ensured that duplicate Controllers were managed as i have a homecontroller in the root and the Admin Area. The code used was; new string [] {"MyAppName.Controllers"} This too went into the global.asax The error i got is below; A route named 'Applicants_default is already in the route collection. Route names must be unique. Parameter name: name how to resolve this?
I am having an issue with MVC-3 generating outgoing routes for me. This is the address of the page I am on for both scenarios: [URL] Here are the map routes:
[Code]....
Scenario 1: From the controller: [Code].... From the view: [Code]....
The resulting link that gets created. [URL] If I change the controller code to read as follows:
[Code]....
I didn't make any changes in the view, only added those two lines to the controller and the following link is created: [URL] What am I missing here? This is consistent behavior, I was able to reproduce this in other areas of my application.
I am trying to set up dynamic routes in an MVC app, and I have this so far...
[Code]....
And that is working great for now, the only issue I am having is that I would like to have the ability to specify a comma delimited list of optional arguments in the database that I could pull out like...
I understand the basics of setting up routes, I am trying to get a handle on how to organize more complex routes. Does the Route name do anything? I havn't seen a place it's actually used. If I have the route: controller/action/id/paramA/paramB/paramC. ParamA-C could be defining multiple parameters so First/Last/Zip or Phone/Zip/Birthday. Is it common practice to name the additional parameters with a generic name like paramA vs trying to differentiate a separate route for each?
Lastly, if you have multiple sites/functional areas in 1 site, lets say the asp.net site, each area MVC, Ajax, Forums ect were all different functional areas. Is it best to create a different group of routes such as hard coding the controller like:
MVC/action/id Ajax/action/id Forums/action/id
or is there a better way? What I am running into is 1 piece of the site overriding the other route because of the number/type of parameters.