MVC :: How To Route Files With Extensions I.e .txt And .xml
Jul 11, 2010
I have a site that requires the robots.txt and the sitemap.xml be different almost everytime its called. So I need a way to generate the robots.txt on the fly everytime its called. [URL]will hit a controller function and there I will write the return data there. I been looking around and I have no clue how to do this with the extension present.
View 3 Replies
Similar Messages:
Feb 9, 2010
I have a web based application, asp.net with vb.net. However, i have different files with different extension such as .CSV and .RTF, and the clients need to download these files in regularly bases
View 18 Replies
Mar 28, 2010
In ASP.net MVC 2, I can use routes.RouteExistingFiles = true; to send all requests through the routing system, even if they exist on the file system.
Usually, this ends up hitting the "{controller}/{action}/{id}" route and throws an exception as the controller cannot be found.
I do not want to use that route though (I have only a few URLs and they are specifically mapped), yet I would still like to prevent access to the file system.
Basically I want to Whitelist pages using IgnoreRoute. Is there a built-in way to do this?
My current approach is to still have a route "{*anything}" and generate a 404 when this is hit, but I'm just wondering if something is built-in already?
View 1 Replies
Mar 13, 2011
I tried to mix asp.net 4 webfrom and ASp.Net MVC 3. I add required lines in webconfig, but I've issues implementing route in global.asax
Currently I use several routes for webfroms. routs template are like below
routes.MapPageRoute("Node", _
"article/sport/{nID}/", _
"~/article/articleview.aspx")
I encounter error, when I add below lines to global.asax
routes.MapRoute( _
"Defaultss", _
"{controller}/{action}/{id}", _
New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional} _
)
I want to know how could I mix ASp.Net MVC routes with webforms routes.
View 3 Replies
Mar 9, 2010
when i run the app i got this error
A route named 'Admin_default' is already in the route collection. Route names must be unique.
Parameter name: name
this is my AdminAreaRegistration
[Code]....
View 2 Replies
Sep 24, 2010
I have a url that I want to map routing to:
[URL]
where tabvalue is one of: "personal", "professional", "values" or nothing.
I want to map it to a route like:
Member/Edit/{tab}
But my problem is - I don't know how to specify such constraints. I'm trying this regex:
^[personal|professional|values]{0,1}$
but it only works when I use url
[URL]
[URL]
and doesn't work for
[URL]
how to specify the correct constraint?
P.S. I'm not using MVC, just asp.net WebForms
View 6 Replies
Mar 14, 2011
Was looking at asp.net mvc complex routing for tree path as an example of how to define a custom route handler for my MVC app. Essentially, I want to give the end user ultimate flexibility in defining the URL for any given page, so I provide them with a field in the interface to specify their own custom URL.
My custom route handler is basically a wild-card handler. It will do a lookup and if it finds a match, map it accordingly. However, if no match is found, I want it to fall back and find the next rule that matches in the global.asax. Is that possible? Or do I essentially need to code the mappings that used to exist in my global.asax into my custom route handler?
View 2 Replies
Feb 15, 2010
By default ASP.NET 3.5 Web App project has references to assemblies System.Data.DataSetExtensions.dll and System.Web.Extensions.dll.
With System.Data.DataSetExtensions everything is clear for me, it contains such useful extension methods as DataTable.AsEnumerable() and DataTable.CopyToDataTable().
And what about System.Web.Extensions.dll? What useful members could you mention to use?
View 4 Replies
Apr 21, 2010
How's authorization supported in Telerik's MVC extensions? I am particularly interested in two cases:
tabs
grid row editing/deleting/inserting
View 1 Replies
Jun 17, 2010
This question may sound strange and defy all programmer's logic, but I want to know if there is any way I can do AJAX on a website (ASP.NET MVC) without using the extensions provided by Microsoft?
I've done AJAX using PHP w/ jQuery. This is the first time I'll be doing it with ASP .NET, however the requirement is that I cannot use Microsoft's AJAX libraries or jQuery (or basically anything thats easy).point me to any resources that might help me re-invent the wheel?
View 3 Replies
Aug 26, 2010
I moved a site to another server, it worked fine for a a while, but then crashed. I figured out that System.Web.Extensions.dll was missing, so I copied it again. After a while it was missing again. Using Process Monitor I figured out that IIS (w3wp.exe) deletes the file soon after I copy it to the bin folder. (CreateFile with "Read Attributes, Delete" access.)
View 1 Replies
Jan 27, 2010
I'm migrating an asp site to a new asp.net site.
The old site has file extensions like "product.asp_q_e_200" (where 200 would be a product ID).
how I can handle these odd extensions?
View 5 Replies
Mar 3, 2010
I am an ASP.NET C# web developer.The architecture followed is 3 layer The layers used are
1. UI
2. BLL (Sometimes Communicating with BLL is done using WebServices)
3. DAL
Pretty basic stuff.
What I would really like to have is a BLL.Common class in the BusinessLogics.Here I would like to use some useful extensions and helper functions that we use in almost all applications.
An example will IsNullOrEmpty extension.
Which are the helper functions most commonly used by developers?It would be better if I could get a list.
View 1 Replies
Jan 11, 2011
I have an older classic ASP website that I am migrating over to IIS7.5. I don't feel like installing classic ASP on the server, and so I just want the .asp files to be treated as if they were .aspx files.
How do I go about doing this in IIS7.5?
EDIT: To clarify, I am NOT asking how to get classic ASP code to work under .Net. I am just asking how to map the .ASP file extension to be handled by the .net runtime. I will upgrade the code in the .asp files to .net.
EDIT:
I gave up and ended up installing classic ASP, as I couldn't get the mapping to work (received a combination of 404.17 and 404.3 errors). I marked David Lively's answer as correct as it was the most detailed and helpful.
View 3 Replies
Dec 3, 2010
When I open a 3.5 related web project then the Ajax extension is showing; e.g.: script manager,update panel etc
However when I open a 2.0 web project then Ajax extension is not showing.
what to do if I want Ajax extension to be available in case of 2.0 related project.
Do I need to download an installer? If so then tell me URL from where I can download Ajax extension for 2.0.
View 1 Replies
Aug 19, 2010
How do you filter on more than one extension?
I've tried:
FileInfo[] Files = dinfo.GetFiles("*.jpg;*.tiff;*.bmp");
FileInfo[] Files = dinfo.GetFiles("*.jpg,*.tiff,*.bmp");
View 7 Replies
Feb 21, 2010
how do I get the 3.5 extensions to show in my vwd toolbox? I've got .net 3.5 sp1 installed and the silverlight toolkit and the silverlight 3 tools. I want to use the media player control.
View 5 Replies
Jun 4, 2010
I downloaded and installed the AjaxControlToolkit.Binary.NET35.zip.I added Accordion, and add Accordion panels. Building the web site always fails. There are several error messages, like, Type 'AjaxControlToolkit.Accordion' does not have a public property named 'AccordionPane'. I checked the web.config file there are two different versions of System.Web.Extensions and System.Web.Extensions.Design.One is version 3.5 and another is 1.0 See the copy followed,
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
[code]...
View 5 Replies
Jul 8, 2010
I purchased a new computer and put all my development software on. Now when I load an asp.net 2.0 project I get the following error:-
Code:
Error3E:RPPResolve-ITASPDotNET2.0HansooKwanDirections.aspx: ASP.NET runtime error: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (E:RPPResolve-ITASPDotNET2.0HansooKwanweb.config line 44)E:RPPResolve-ITASPDotNET2.0HansooKwanDirections.aspx11E:...HansooKwan
View 9 Replies
Apr 27, 2010
Why can I not add ScriptManager control or UpdatePanel to a page in Visual Studio 2010?The drag( or double click) just fails - it seems like there is an incompatibility somewhere?UPDATE:This is 'default' install of 2010 Ultimate on Windows7, create a web application, cannot drag ScriptManager or UpdatePanel to the designer. Typing the declarations works.The cursor changes to the [+] icon when you drag it to the right place but nothing appears to happens on 'drop', briefly the documents name has * appended, this quickly changes back to normal, either is saves or does an undo.I'm assuming something is going wrong so it undos...but what is going wrong?
View 1 Replies
Feb 23, 2010
One of the libraries I am including in my project makes use of System.Web.Extensions 3.5.0.0, which conflicts with my Framework 2.0 application, which uses (C:Program FilesMicrosoft ASP.NETASP.NET 2.0 AJAX Extensionsv1.0.61025System.Web.Extensions.dll). I can think of 3 possible solutions:
Ignore the warning and don't change anything. I am not sure what the application does to handle this.
Add an assembly binding element to my web.config (see below) Configure the application explicitly to use different assemblies (I think this is possible, but don't know how to do it).
However, I am unsure of the implications of each of these decisions. The application seems to work perfectly fine even when I ignore the warnings (solution 1), but ignoring warnings that I don't fully understand bugs me...as does having warnings like this show up at all.
[URL]
View 1 Replies
Mar 24, 2011
I have Visual Studio 2010 installed on my dev server and of course AJAX extensions were automatically installed; but now I need to move the feature I have developed to my staging and production boxes. I do not want to install Visual Studio on either of these boxes! I have scoured the google and found broken links to the extensions, links to the old v1 and v2 extensions in other words I cannot find out where to download the extensions and most importantly how to install them on Server 2008 (IIS 7). I have implemented a feature that uses the Script Manager not any of the controls in the toolkit so don't link me to the toolkit unless you can point to documentation that states ScriptManager is included.
1. The link for downloading 2. A link to installation instructions for Server 2008 IIS 7.
View 4 Replies
Dec 16, 2010
I'm new to ASP.NET, and I came across these two different extensions while browsing around. What's the difference between them?
View 2 Replies
Dec 21, 2010
I currently have a MVC2 application hosted on premise that allows the user to add custom extensions (controllers, filters, views, validators) so that they can extend the application to suit their needs. I'm using MEF as my composition container, but MVC2 relies on the extensions (assemblies, views and scripts) to be located in a particular directory or found at runtime based on a configuration setting. The MEF catalog is instantiated at startup meaning if any new extensions are required to be added or updated then the application needs to be restarted. This is all fine in a single-tenant world but now I want to make it multi-tenant hosted in the azure cloud.
The problem I forsee is the location of the custom extensions and how they are deployed. My initial thought is to use azure blob storage (one per tenant) to store the custom extensions and then download per-session (rather than Application Startup), however in the past the way MVC has worked is it tries to resolve assemblies and find views within the current AppDomain whereas my assemblies and their embedded resources will be in memory.
View 3 Replies
Sep 22, 2010
the reason i posted this question is that i just added ajax toolkit in my visual studio 2005 and i installed ajax web extension version 1; downloaded from microsoft website named "ASPAJAXExtSetup" but when i added ajax object in my web form i ve gotten this error: "Error 1: Indirect reference is being made to assembly System.Web.Extensions version 3.5.0.0, which contains 'AjaxControlToolkit.CalendarExtender'. This Project references a prior version of System.Web.Extensions version 1.0.61025.0. To use 'AjaxControlToolkit.CalendarExtender', you must replace the reference to System.Web.Extensions with version 3.5.0.0 or higher. C:inetpubwwwrootAJAXEnabledWebSite1Default.aspx 1 1 C:...AJAXEnabledWebSite1"
is there any option to upgrade ajax web extension version 1 to upper without installing visual studio 2008 and .net 3.5? or any other solution?
View 5 Replies