.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

what in the wierd.. please help

Posted By:      Posted Date: October 23, 2010    Points: 0   Category :ASP.Net


Say I have an aspx page (page.aspx) and in the page load event I have a code to generate a txt file. Here the sequence of action:

  1. type the address in the address bar of IE browser (e.g. http://localhost/somesite/page.aspx) --> this will execute the page load event and generate the txt file.
  2. Delete the generated file above and In the same browser(page), re-type the same url (http://localhost/somesite/page.aspx) --> this will not execute the page load event and of course will not generate the txt file
  3. Click the refresh button on the browser, now it executes the page load event and generates the txt file.

Can anyone explain what is happening on step #2? is this some sort of page level cache?


View Complete Post

More Related Resource Links

Wierd error during execution of SerializeReply of IDispatchMessageFormatter

I am trying to develop a WCF REST app as explained in http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/04640a45-1a37-4722-8ed7-9f75c155dc14 (which serves both XML and JSON at the same time). the error is in the return statement of the following code: Public Function SerializeReply(ByVal messageVersion As System.ServiceModel.Channels.MessageVersion, ByVal parameters() As Object, ByVal result As Object) As System.ServiceModel.Channels.Message Implements System.ServiceModel.Dispatcher.IDispatchMessageFormatter.SerializeReply Dim formatter As IDispatchMessageFormatter = Me.xmlFormatter If OperationContext.Current.OutgoingMessageProperties.ContainsKey(WebBodyFormatMessageProperty.Name) Then Dim webBody As WebBodyFormatMessageProperty = DirectCast(OperationContext.Current.OutgoingMessageProperties(WebBodyFormatMessageProperty.Name), WebBodyFormatMessageProperty) If webBody IsNot Nothing AndAlso webBody.Format = WebContentFormat.Json Then formatter = Me.jsonFormatter End If End If Return formatter.SerializeReply(messageVersion, parameters, result) End Function It gives the error as "The given key was not present in the dictionary." further going deeper the stack trace looks like the following: Encountered unexpected namespace 'http://schemas.microsoft.com/ws/2005/05/envelope/none'. The namespace must be empty. Parameter name: ns

Wierd case of: Msg 213, Column name or number of supplied values does not match table definition

Hi, I'm working on several triggers (that happen after insert or update) in order to log the changes in a different table. They all follow a similar syntax and are working fine, except for this one... I've reduced the next code to the minimum that gives an error, so we can safely assume the other parts of the trigger are working fine. INSERT INTO [Adt].[WardUnitStayLog] SELECT t.* FROM [Adt].[WardUnitStay] t INNER JOIN inserted i ON i.[Id] = t.[Id]; I've used this same syntax (but on different tables) in other triggers, and these are working perfectly fine. The above query provides the next error: Column name or number of supplied values does not match table definition. I've checked both tables for differences in the columns, but to no avail... (I've checked them manually and by outerjoining the information_schema.columns) (I've also checked the order in wich these columns are defined, they match over the two tables) These are the creation scripts for the tables: CREATE TABLE [Adt].[WardUnitStay] ( [Id] [dbo].[Id] IDENTITY(1,1) NOT NULL, [UnifiedUnitStayId] [dbo].[Id] NOT NULL, [WardCd] [dbo].[Cd] NOT NULL, [_FirstAtTm] [dbo].[Dtm] NOT NULL, [_IsReservation] BIT NOT NULL, [_LastAtTm] [dbo].[Dtm] NOT NULL, [_LastBedCd] [dbo].[Cd] NULL, [_LastPhysicianUid]

Very Wierd User Authentication Issue

We recently had a new starter for whom HR assigned the wrong Windows user name (his initials are P.S. and he got the username pc12, which should have been given to another guy who was starting at the same time...) It took a little while before this came to light and by this time the user had logged on, accessed a bunch of applications etc... Eventually, everything gets straightened out in AD and both users now have exactly the right records. The only problem is SharePoint. Profile information is fine, but (and this is the weird part) when P.S. accesses the site, he gets 'Welcome Pxxxx Cxxxx' (the other guy's name). We have been trying to resolve this for days now, so there has been plenty of time for any required replication and there have been about 100 iis resets. Now get this, when P.S. accesses other internal Web sites, he's authenticated fine - it's just SharePoint! I sense a support call coming on, but if anyone else has seen anything like this it would be great to hear any ideas.

WCF Wierd Communication Exception



I have two WCF services one public facing which proxies to a 'private' service which actually does the real work. The services exposed have identical interfaces and (practically) identical configs.

One of the interfaces is a streaming service using MTOM because there is a method to upload rather large binary files (and some smaller files too) the method is "AddAsset" it takes a binary array and a name and file type.

The client application receives a Communication Exception when attempting to call the AddAsset method but not always: If the client is attempting to upload, say, 20 images it will open the connection to the host and send one image at a time. Most images succeed BUT if an exception is received we have written a "retry" loop which gives it three (set by local config) more attempts. Here are some facts we have discovered:

  1. If a particular image fails once it will always fail in the client application it was run from
  2. The failures only occur from client applications based in one site - all other sites we have tried work no matter the internet connection speed
  3. tracing at the proxy demonstrates the exception
  4. tracing at the backend service does not log the exception - in fact does not log enough I think?
  5. Successive "retries" for an image always fail - that image will

Wierd Html.TextBoxFor behaviour on ajax request



In my MVC web application

I have an aspx page created by a simple url ~Controller/Action. The Action creates a model object by calling through to some application logic. The aspx view for this Action makes a call to RenderPartial passing in the just created object

<% Html.RenderPartial("MyView", Model.MyObject); %>  which is a strongly typed partial view.

This partial is rendered using presentational logic and using the Model.MyObject supplied and renders textboxes and labels etc -I am using Html.TextBoxFor to render out the text boxes.

The partial view contains a dropdownlist, that i hook up to a JQuery ajax request to go and fetch a new render for the partial view itself.

The view presents a user's address, first-name, last-name, address line 1, line 2, city, postcode etc and allows them to change address to a different country and the dropdown gives a choice of countries.  Changing countries goes and fetches a new layout for the form, based on each country's requirement, eg UK has post code, US has Zip code, different regex etc etc

So - The Ajax request goes through the EXACT same logic as the original Get request to build the model for the view, and the HTML is passed back to the JQuery request to update the <div> containing address details.

In VS2010 i can see the mo

Wierd SSIS issue


I have a package that runs from my 64 bit server.

I run it via a command line:

""C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\dtexec.exe" /DTS "\MSDB\BankImportsProd" /SERVER VSLPBBIDB01 /MAXCONCURRENT " -1 " /CHECKPOINTING OFF  /REPORTING V"

It has been working.but then stopped.

If I run it from my workstation or when it runs from it's schedule - I get a "login failed for user sa'

If I login to the server and execute the job from the server it runs fine.

Any ideas?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend