MVC :: Routes Not Picking Up With Another HttpModule Before The UrlRouting Module?

Jan 15, 2010

I have integrated MVC into an existing web forms application which is an in house CMS system. There are two HttpModules. The first one is part of the in house CMS system and does url routing (for the web form pages) along with other required actions. The system creates routes from records in the database and if the page is an MVC Controller, the first HttpModule that belongs to CMS system does not do any more routing and the UrlRouting module should find the route and handle it. Locally it all appears to work fine with the built in Visual Studio debugger webserver. However when published up to remote webservers, all MVC pages result in a 404...even statically created routes on application startup. At the moment, the external webserver does note have remote debugging enabled so I'm stuck there. I am assuming it's related to the multiple HttpModules since standalone MVC applications do work fine on the remote webservers.

View 3 Replies


Similar Messages:

Web Forms :: SiteMapPath With UrlRouting Not Working On Dynamically Generated Routes VB

Feb 28, 2011

I am learning .net and I have implemented SiteMapPath on a site i'm developing which uses Url Routing. It is working fine for static routes but i am trying to get it to work on a dynamically generated route that passes a {date} and a {title} but I can't find any information on it anywhere, I have a book but it doesn't go in to SiteMapPath with UrlRouting.

I have set up routes in Global.asax file:

[Code]....

My web.sitemap currently looks like:

[Code]....

View 1 Replies

Httpmodule - Debug HTTP Module Init Event From Application?

Sep 21, 2010

Is it possible to debug the init event from a http module? If I set breakpoints, they don't get triggered.

View 2 Replies

ASP.NET: What Does HttpModule Do - System.ServiceModel.Activation.HttpModule

May 31, 2010

the purpose of this HttpModule? It's showing up on my HttpModuleCollection list, but I don't know what's it's for.System.ServiceModel.Activation.HttpModule

View 3 Replies

MVC :: Routes.IgnoreRoute Not Ignoring Routes?

May 25, 2010

I'm trying to prevent direct file requests from being accepted, and have tried this:

[Code]....

None of these worked. I want the rule to exclude any file of any filename in any directory with a matching extension. How can this be done?

View 11 Replies

Use Slashes In UrlRouting?

Jun 16, 2010

I'm using UrlRouting in my app which is an ecommerce application. My Urls are configured as /shop/{ProductCategory}/{ProductName} I would like to use / character in the product category section so that I can show category/subcategory hierarchies e.g. /Electronics/Media-Players/ in this case this whole thing is the category but when I use it like this my current logic is thinking "Media-Players" is the product name. Is there a way to use slash characters in UrlRouting within a field?

View 6 Replies

How To Mix DynamicData Routes With Mvc Routes

Jan 9, 2011

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.

View 1 Replies

Picking The Right Web Technology?

Mar 25, 2011

I need to create a web application where the layout of the site is entirely programmatically generated - about the only thing that's done declaratively in the markup is the header. Basically, it's one of those AJAX-enabled entire-site-within-a-single-page type of sites where huge chunks of content (structured as modules such as navigation panes for example) are swapped in and out on the fly. From lowest-level to highest-leveled, the options I've considered are:

Classic ASP - Since ASP provides full control over the final output, this would be perfect if not for the lack of separation between logic and presentation and the subsequent lack of code reusability. ASP.NET MVC - REST and MVC routing seem like a poor fit, since there's only 1 actual webpage. Also, interpreting and transforming data and even the UI itself based on business rules (as opposed to direct user input) lies well outside of the deterministic CRUD operations that MVC excels at.

ASP.NET Webforms - Tried something like this using Webforms in the past, but ended up fighting with the ViewState and Postback event model every step of the way. Needless to say, performance was extremely poor and the codebehind was a mess due to the complex logic needed to fully and precisely regenerate each and every single aspect of the page on every single Postback. Silverlight - To be honest, I've never used this. Non-Microsoft technologies - None of the popular ones (PHP, JSP/J2EE, Flash) are entirely suitable either.

View 2 Replies

Picking Labels From A Form?

Jan 13, 2010

I have a program called Bartender which is a labeling program and it can use Visual Studio as an interface. I have been given the task to make our staff have an easier way of processing a label.

The data which I need is on our P:/ NOTAPE directory. Now in this folder is a list of text files which our ERP system generates.

I want the user to open up a form and have the ability to type in the Batch file number and press return(TextBox1). On pressing the button(Button1), the File will then be picked up and then passed on to Bartender which will then go through the procedure of asking how many labels need to be printed.

This is my code so far.

[Code]....

View 2 Replies

AJAX :: Picking UpdatePanel And Textboxes

Sep 8, 2010

I have two texboxes (text_start and text_end) both using calandarextenders to pick dates. What I im trying to do is when the user picks the "text_end" date - this will force an update panel to refresh. This updatepanel holds a single dropdown whose sqldatasource uses both dates as parameters.

View 3 Replies

.NET MVC 2 Website Doesn't Seem To Be Picking Up Code Changes?

Jun 29, 2010

I've just deployed my first ASP.NET MVC 2 site, and all appears to be well except I've run into an issue with IIS banning double-escaped characters, which I was relying on for a few routes.As I don't have control over IIS (it's on a shared host) I've decided to go around the issue and replace the spaces with underscores in my URLs. Have tested and verified that this works on my local machine, and deployed the two new model classes which contain the methods that url-encode and url-decode the various bits that need this.

However, the remote website hasn't apparently noticed that I've updated the code. I've edited web.config a couple of times to try and force a recompile, deleted the remote model classes and reuploaded them, and googled around for any other reason why this would be happening.

View 2 Replies

Databases :: While (dr.Read()) Not Picking Up All Rows?

May 18, 2010

The 'while (dr.Read()) statement in this code set is not process all the rows picked up by the sql statement in the access file. It will only process the first row found and ignore the rest. I can't seem to figure out why.

[Code]....

Here is the code in my access file: Product_Series_PendingAccess.sqlSelectAllRows

[Code]....

View 4 Replies

C# - Picking A Server Control Depending On Environment?

Aug 4, 2010

I have an aspx page that references a server control from an assembly and lives in Sharepoint (knowledge/experience in Sharepoint is not required to answer this question, i'm simply giving you context). The implementation looks something like this:

<%@ Register TagPrefix="wc" Assembly="Test.Controls" Namespace="Test.Controls" %>
<wc:WYSIWYG runat="server"></wc:WYSIWYG>

I can NOT change the .aspx page's content which currently lives in Sharepoint and I have to to take the same code and run it outside of Sharepoint but still on an ASP.NET environment. It's cool and crazy at the sametime, I know.

When this aspx page is running in Sharepoint, I have to get the WYSIWYG editor control to use Sharepoint's WYSIWYG control. When the same aspx page is running outside of Sharepoint but still in an ASP.NET environment, I need it to use a different server control that's not dependent/from Sharepoint. How could I modify the code-behind to perform this toggling? Is this even possible?

View 1 Replies

Web Forms :: Picking Random Items From A List Based On Percentages

Jun 10, 2010

I am trying to make a way so that I can have a group with items in it, each one of the items (which is an object in a list) having a double type value, the total of all the items in the group is 100 when you add up all their properties. The purpose of this is that there can be random selection of the items.

for example:

item 1 percent property: 25.0
item 2 percent property: 25.0
item 3 percent property: 25.0
item 4 percent property: 25.0

When a request comes in, I need to be able to pick 1 of these items at the rate of 25% so that after a while (more and more requests) that each of these gets very close to 25%. I have tried looking at random numbers but pulling a number back seems useless in this case because for example if a random number retrieved was the number 5.4, how would I send it to an item? I cannot keep a history of the item requests so that I can factor that in. I need to be able to pick a random number and over time have each of these 4 items be selected an equal amount of times, the percentages and amount of items is going to change constantly but the sum of all the percent properties within a group is 100%. What is the best way to accomplish this in C# with a web form?

View 2 Replies

WCF / ASMX :: WCF Deadletter Queue Service Stops Picking Up Messages

Dec 15, 2010

I have a custom dead letter queue service to pick up messages from DLQ. This service picks up failed message from DLQ and tries to resend to a different end point. If the new endpoint doesn't work, it rolls back transaction. This works great. Here is the code.

{
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Single,
AddressFilterMode = AddressFilterMode.Any)]
public class FDPDLQService : IFDService
{
FDPManager _fdpManager = new FDPManager();
[OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
public void ProcessFDMessage(FDMessage message)
{
//System.Diagnostics.Debugger.Launch();
try
{
MsmqMessageProperty mqProp =
OperationContext.Current.IncomingMessageProperties[MsmqMessageProperty.Name] as MsmqMessageProperty;
// if message log required, and configured, log the incoming message
try
{
ChannelFactory<IFDPRouter> factory = new ChannelFactory<IFDPRouter>("IFDPRouter_EP");
IFDPRouter proxy = factory.CreateChannel();
string ep = proxy.GetNextEPForGivenEP(OperationContext.Current.IncomingMessageHeaders.To.ToString());
if (ep == null || ep == string.Empty)
{
throw new EndpointNotFoundException(Common.Constants.FDP_NOT_FOUND_EXCEPTION_MESSAGE);
}
// Process message with next end point available
_fdpManager.ProcessFDMessage(message, ep);
}
catch (EndpointNotFoundException enfe)
{
ExceptionManager.HandleException(enfe);
Transaction.Current.Rollback();
//throw;
}
catch (Exception ex)
{
ExceptionManager.HandleException(ex);
Transaction.Current.Rollback();
//throw;
}
}
}
}

Below is config entries.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<netMsmqBinding>
<binding name="DLQServiceBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" deadLetterQueue="Custom" customDeadLetterQueue ="net.msmq://localhost/private/FDPDLQ"
durable="true" exactlyOnce="true" maxReceivedMessageSize="65536"
maxRetryCycles="2" receiveErrorHandling="Fault" receiveRetryCount="5"
retryCycleDelay="00:30:00" timeToLive="00:01:00" useSourceJournal="false"
useMsmqTracing="false" queueTransferProtocol="Native" maxBufferPoolSize="524288"
useActiveDirectory="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream"
msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
<message clientCredentialType="Windows" />
</security>
<!--deadLetterQueue="System">-->
</binding>
<binding name="DefaultBinding" >
<security mode="None" />
</binding>
<binding name="FDService_EP" closeTimeout="00:01:00" openTimeout="00:01:00" deadLetterQueue="Custom" customDeadLetterQueue ="net.msmq://localhost/private/FDPDLQ"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
durable="true" exactlyOnce="true" maxReceivedMessageSize="65536"
maxRetryCycles="2" receiveErrorHandling="Fault" receiveRetryCount="5"
retryCycleDelay="00:30:00" timeToLive="00:01:00" useSourceJournal="false"
useMsmqTracing="false" queueTransferProtocol="Native" maxBufferPoolSize="524288"
useActiveDirectory="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream"
msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
<message clientCredentialType="Windows" />
</security>
</binding>
<binding name="FDChecking_EP" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" deadLetterQueue="System"
durable="true" exactlyOnce="true" maxReceivedMessageSize="65536"
maxRetryCycles="2" receiveErrorHandling="Fault" receiveRetryCount="5"
retryCycleDelay="00:30:00" timeToLive="1.00:00:00" useSourceJournal="false"
useMsmqTracing="false" queueTransferProtocol="Native" maxBufferPoolSize="524288"
useActiveDirectory="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream"
msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netMsmqBinding>
<netNamedPipeBinding>
<binding name="Teletrac.EFX.Interfaces.FDService.IFDPRouter" />
</netNamedPipeBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="DLQServiceBehaviour">
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Teletrac.Customer.Services.FDPDLQService.FDPDLQService" >
<endpoint address="net.msmq://localhost/private/FDPDLQ" binding="netMsmqBinding"
contract="FDPServiceRef.IFDService"
bindingConfiguration="DefaultBinding"></endpoint>
</service>
</services>
<client>
<endpoint address="net.msmq://localhost/private/fdmessageQueue"
binding="netMsmqBinding" bindingConfiguration="DLQServiceBinding"
contract="FDPServiceRef.IFDService" name="FDService_EP" />
</client>
</system.serviceModel>
</configuration>

This works great.

But if all endpoints are not available for a long period of time, and if service rolls message back to the DLQ for a long period of time, after a certain period of time service stops picking up messages from DLQ. I am not sure which configuration is responsible for this.

View 2 Replies

Forms Data Controls :: VB Page Textbox Which Is In The Formview Is Not Picking Up?

Sep 21, 2010

I am using a form view to update details off activities, i have used the asp.net wizard to update the activities but for some reason in my VB page my textbox which is in the formview is not picking up.

[code]...

Basically what I am trying to write is: How can I rewrite this statement so that the textbox and the dropdownlist is recognised in the vb page?

View 6 Replies

DataSource Controls :: Object Data Source Not Picking Up Business Objects?

Mar 26, 2010

I created a class library: PRTreatmentReviews. I created a reference for the class library on the website. I checked the property pages and the reference to the class is there. I put objectdatasource on a page and tried to pick up the PRTreatmentReviews class but it's not there? The Class

[Code]....

View 13 Replies

MVC :: 2.0 Messing Up Routes In ARR 2.0

Dec 28, 2010

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.

View 2 Replies

MVC :: Routes Error In 2 RTM

Apr 3, 2010

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?

View 6 Replies

MVC :: ViewBag And Routes (3 - RC2)

Dec 18, 2010

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.

View 4 Replies

C# - Routes With Multiple Arguments In MVC 3?

Jan 19, 2011

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...

Array optParams = rdr["parametersOpt"].ToString().Split(',');

But I was not sure how to stick those params into the route object properly. Could just be a minor C# syntax I am not familiar with.

View 2 Replies

MVC :: How To Organize More Complex Routes

Mar 12, 2011

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.

View 5 Replies

MVC :: Database Localization Url Routes With 2?

Jan 19, 2011

I been looking for hours on the web to find a good tutorial where I can do a database localization with mvc 2, I can't find any its all resource files. So I'm trying to reach out to you guys and see if you got any links, books or suggestions on this topic? I would love for it to be url routes based localization but that I can figure out somehow i think.

View 10 Replies

MVC :: Custom Routes For 5 Different ActionResult()?

Apr 6, 2010

I'm creating a new ASP.NET MVC 2.0 web application that will have 5 main pages:


- Home
- Services
- Contact Us
- Terms & Conditions
- Priva

View 2 Replies

MVC :: Adding Routes - Best Practices?

Jul 4, 2010

We are working on a project which has lots of routes that can be changed on-the-fly or new routes can be added dynamically. What are the best practices about managing lots of routes and adding routes on-the-fly without recompiling? Reading-Writing from-to database or from Xml Document in Application_Start?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved