MVC :: Action Runs Twice In IE8 Only?

Jun 25, 2010

We hit the problem in our asp.net mvc application where our controller action method would be hit twice in
IE8.

This issue does not occur in both FF and Safari.

We have also disabled javascript during our test and it still hits it twice. The first time it passes model properly whereas the second time the model is null.

It does it across all pages.

Has anyone hit this problem before? Bear in mind it's only in IE8 and it's not javascript related.

View 3 Replies


Similar Messages:

MVC :: Why Synchronous Action Wasn't Executed Until Asynchronous Action Completed

Nov 29, 2010

I'm implement Comet in Asp.net MVC, I used timer to keep Async request in server, Async request will complete when timer elapsed 1 minute and response to client (to avoid 404 error) and then reconnect to Async Controller. I also wanna execute some Synchronous action during Async request was holding, but the problem is: When an Async action was executed and hold by using timer, the Sync Action wasn't called until Async action (comet long-live request) completed. I did test with firefox 3.6 many times, but the result is the same, so strange, Do you know why ? I have a sub some questions : To implement comet, using timer (response after some minutes elapsed) or thread (response after several time sleeping thread) to hold async request, which is better?

View 1 Replies

MVC :: Redirect Action Not Working In Jqgrid Action Results Method

Mar 23, 2011

I am desiging a master and details page from a search page..user can search for something and I need to display the result in jqgrid if the result has more than 1 row or record.. if the result is just one record then i have to directly send then to details page by skiping grid page... I do have an action method for results page and one more action method for Jqgrid data..i am trying to check the row count for the database result and trying to redirect to details action results..but its not working at all..and showing an empty jqgrid..

[Code]....

View 9 Replies

Test That A Controller Action Simply Returns A Link To Another Action?

Apr 29, 2010

Lets say I have a simple controller for ASP.NET MVC I want to test. I want to test that a controller action (Foo, in this case) simply returns a link to another action (Bar, in this case).How would you test TestController.Foo? (either the first or second link)

My implementation has the same link twice. One passes the url throw ViewData[]. This seems more testable to me, as I can check the ViewData collection returned from Foo(). Even this way though, I don't know how to validate the url itself without making dependencies on routing.The controller:

public class TestController : Controller
{
public ActionResult Foo()[code].....

View 1 Replies

MVC :: Create Action Not Carrying Model Across To Http Action

Jun 12, 2010

My httppost action doesnt seem to have received my model. The code is below;

[Code]....

i put a breakpoint on the line; return RedirectToAction("Error", "Dashboard"); and i found that appQualif carried no values whatsoever from the form i submitted..

View 5 Replies

How To Pass Parameters To An Action Using Html.Action() In MVC?

Jun 30, 2010

I've been using Html.Action("ActionName", "ControllerName") to invoke child actions across controllers without needing to have the view in ViewsShared. This has been working great for displaying things like session or cookie information.

Instead of just accessing cookies, I would like to pass additional parameters to Html.Action("ActionName", "ControllerName") so the action can execute different code based on the the data passed to the original view.

Should I be using a different method to pass parameters to a child action in a different controller?

View 1 Replies

MVC :: Controller Invokes GET Action Instead Of POST Action

May 20, 2010

I'm trying to add file upload functionality to a page. I've got a form that posts the selected file to a controller with a 'savefile' method. But if I don't add a get version of 'savefile' I'll get a 404 error. Here is the form code which is presented on the Index page:

[Code]....

And here is the controller code:

[Code]....

Intuitively I don't think I should need a GET version of SaveFile but if omit it I get a 404 error when the form posts. Why should I need a GET version of SaveFile when all I want is to post a form and save the file?

View 4 Replies

MVC :: Dynamically Adding Action Filter To Action?

Jun 21, 2010

Does any one know how to dynamically add ActionFilter to an Action?

View 3 Replies

How To Figure Out App Runs At 32-bit On A 64-bit Machine

Apr 15, 2010

I have a .NET app (webforms - .NET 3.5) that is running on a 64-bit server as 32-bit (I checked the IntPtr.Size result). The compilation is set to AnyCPU so I would expect that on a 64-bit machine, the app would be run at 64-bit. There are many Third-party programs incorporated into the app, could they be causing a problem? How do I figure out why 64-bit compilation is not being done?

View 1 Replies

Initialization Area In .NET That Only Runs Once?

Dec 6, 2010

I've got a piece of code that I want to run one time when my website is first loaded.It is basically a static initialization of another module.Is there some event I can hook into that runs when the site is first served to a client?It doesn't even need to be per session, just on first load to any client.

I'm using vs2010, .net 4.0, asp.net 4.0

View 2 Replies

MVC :: Determine Which Action Invoked Particular Action?

Nov 12, 2010

I have a controller with a bunch of actions as such:

[Code]....

I'm looking for a way to find out which action invoked the other: for instance, when redirecting to Action1, I need to know whether it is coming from clicking "next" button at Action0 or clicking "back" button at Action2. This is is to avoid performing Action1 twice (My app is like a wizard, if I click back button at Action2, I don't want to execute Action1 again).

View 1 Replies

C# Pdf Generator That Runs On Medium Trust

Jan 17, 2011

I need to generate PDF reports on a server where full trust apps cannot run.(i cannot use PdfSharp and MigraDoc because of security exceptions when i say

PdfDocumentRenderer renderer = new PdfDocumentRenderer(true, PdfSharp.Pdf.PdfFontEmbedding.Always);
renderer.Document = doc;
renderer.RenderDocument(); // <<< ex here
renderer.PdfDocument.Save(filePath);

Message: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.so i need to
have asp.net c# pdf generator that runs on Medium Trust or Low trust OR be able to pass values from asp.net c# to any php pdf generator.I am trying itextsharp-5.0.5,

View 2 Replies

Timer In C# Runs For 20 Minutes Then Stops?

Feb 25, 2010

I'm building a website in ASP.NET with C# code behind files, I'll be using the site on shared hosting due to price, and one of my aims was to have a stored procedure scheduled to run every 1 hour in MySQL and update my database.

Unforunately security arrangements on shared hosting means that users cannot schedule stored procedures, so I decided to tackle the problem another way.

I created a timer in my website inside its own class file in the App_Code folder, it basically starts a timer and then the time elapsed event connects to my database and calls the stored procedure. I then built an admin page that allows me to see the status of this thread (started/stopped) and allows me to start/stop and restart it.

It's installed on my test site that I run from my home PC using Win7 and IIS, and it works beautifully, I can stop start the service and watch the database tick up when it's running...

HOWEVER...it only seems to run for 20 minutes before it stops, I thought maybe it was the garbage collection killing it since that's mentioned in some timer examples but I've added a GC.KeepAlive(Timer) and that's not . I'm really stumped as to what is stopping the timer, it's functionality is dead on the money and how I want it, but it just stops, always after almost exactly 20 minutes.

[Code]....

View 8 Replies

Security :: How To Find A Function That Runs Once

Feb 17, 2010

I want to have a function that runs once when a user logs into my system. It should run once everytime a user logs in. I don't handle my logins with Membership, just with Authentication. How do I accomplish this?

View 1 Replies

AJAX :: PopupControlExtender Animation Only Runs Once?

Feb 20, 2010

I use the PopupControlExtender to show a Panel after clicking a ImageButton. The Panel can be closed by clicking the page outside the panel. This is working fine.

I added an Animation Fading Out the Panel when the Panel is clicked (I have no button on the panel). This is working fine to.

The problem comes when I click the Imagebutton (The Panel appears) followed by clicking the Panel itself (The Panel disappears). If I now click the Imagebutton again, nothing happens as if the animation was not considered finished. The Panel should have appeared again.

If I change the focus on the page, then the animation is in some way reactivated and the popup works again. I already tried the following :

- <EnableAction AnimationTarget="ImageButton1" Enabled="true" />

- Setting the focus to a random control on the page using <ScriptAction />

Is there a way to reset the animation using Javascript ? Using "setValue(value);" ?

<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/App_Themes/Images/Vraagteken.gif" OnClientClick="return false;" UseSubmitBehavior="false" ToolTip="Kies de bedrijfs sector waarvoor de tekst is bedoeld" />

View 1 Replies

C# - Application Runs When Debugging But Not When Published

May 10, 2010

When publishing my web application and then running it will return the error

"Could not load file or assembly 'BaseApplicationName' or one of its dependencies. An attempt was made to load a program with an incorrect format."

However if I run the application through debugging (f5) it runs correctly.

I guess what it comes down to is

what differences are there when running an application through debugging vs publishing it that would cause a problem like this?

When publising I have it set to delete all existing.

History of how it started... I added the 32 bit Oracle.DataAccess dll to my 64 bit system. It would not work and crash giving the same error as above but with the Oracle.DataAccess name instead of the baseApplicationName. I have since removed all references to it and removed the dll to try and get it to run without it once again.

View 3 Replies

Change The Identity An Assembly Runs Under?

Nov 26, 2010

I have an assembly which I call from within my asp.net web site.

I want the assembly to run under a different user than the -windows authenticated - main site runs under.

The reason is, the assembly needs admin permissions - but I don't want the whole website/IIS to be running as an administrator.

Is this possible?

View 2 Replies

C# - Unable To Find DLL When Website Runs In IIS

Feb 9, 2011

When I run the website locally using my VS, everything works.

I am calling a function inside a dll using P/Invoke. DLL is in C++ and it works.

When I deploy the website on IIS, I get the error message Unable to load DLL 'SolvingProbelm.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

The dll resides inside the bin folder. App pool is Classic and .net 2.0

View 1 Replies

.net - Get The Username That Runs The Executing AppPool?

Jun 29, 2010

In ASP.NET or WCF is it safe to use erviceSecurityContext.Current.WindowsIdentity.Nameto get the current username that executes the current thread?I want to ensure that the correct user is impersonated in my WCF Service.

View 1 Replies

Finding The Server Spec. On Which Website Runs?

Sep 27, 2010

i need to find out what are the details of the processor the server has. i need to know which kind of processor, type of OS, RAM etc. i've got a reply from one webhosting company: "This is a shared hosting server, it is a dual processor (quad core xeon 2.8) 16Gb ram, mirrored 300GB SAS15k drives"how can i get those details on other servers without the webhosting company telling me?

View 1 Replies

If There Is A Return If Catch Block Will Finally Runs

Feb 9, 2010

is final run if htere is a return in catch blobk ?

example

try{

}catch(){[code]....

View 3 Replies

Static Field Initializer Runs Before Application_start, Sometimes?

Oct 29, 2010

I've got an ASP.NET web app that is starting to show some very strange behavior. Here's some example code:

// in Bar.cs
public class Bar {
public static Baz baz = Something.Step2();
}
// in Global.asax
public void Application_Start(...) {
Something.Step1();
}

The short version of the story is this: On some machines, Something.Step2 is executed before Something.Step1 and is throwing an unhandleable exception. On other machines, Step1 correctly executes before Step2. Global.asax and all the objects it uses do not refer to Bar at all.

When are static fields supposed to execute in relation to other programming elements? Why would two machines (both Win7 64-bit, both with .NET 4.0, same IIS version, etc) execute things in different orders? The order is consistent on each machine too. On my machine, it always executes Step2 before Step1, but on my coworker's machine it always executes Step1 before Step2.Update I've found the root cause why my static field is being accessed. Class "Bar" from my example is actually a custom authentication module, and is referenced in web.config as the Authentication handler under System.webServer. If I remove that line from web.config, my system calls Step1 first and never calls Step2 at all. My question changes subtly to: "Why does web.config cause my static initializers to fire, and why does it cause them to fire before Application_Start executes?"

View 1 Replies

DataSource Controls :: DTS Runs Manually But Not Scheduled?

Nov 15, 2010

I have a DTS package that runs fine manually but gives the follow error when I create a job for it:

DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2
DTSRun OnError: DTSStep_DTSExecuteSQLTask_2, Error = -2147467259 (80004005)
Error string: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Error source: Microsoft OLE DB Provider for ODBC Drivers
Help file:
Help context: 0

The package logs into a Teradata source and fill a local SQL table. That's it!

View 4 Replies

Table Row Onclick Event That Runs Codebehind?

Mar 24, 2011

I've inherited an ASP.NET project that has poorly designed HTML; in one section, the tags are wrapped with an tag to allow for "click the row to view the information" functionality. The code is:

<asp:LinkButton ID="ViewArticle" runat="server" CommandName="Navigate" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "id") %>' >
<tr runat="server" class="list_item">
<td>some data</td>
<td>some data</td>
<td>some data</td>.........

How do I go about tying a JavaScript "onclick" event to the codebehind?

View 2 Replies

SQL Reporting :: IE Error When Report Runs On Server?

Apr 5, 2010

I have made one report when i m opening this report in BI studio and run in debugging mode in BI it its displaying the report corretly, but when i have deployed the reports and run it through url, after selection of parameter and when i it runs then after some time its give me the error of INternet explorer send error report with the option of debug, when i select its open Visual studion debugging error screen to slect debugging engine.

when i select parameter for shorter time period, then the report is opening in url.

But if i give 1 yr time period, then its give me error, but the same duration im not getting error in BI Studio?

View 2 Replies







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