.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

WCF request/reponses always allocated Default Activity ID in ServiceTrace

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :SharePoint

I am developing a Windows Forms application which makes a WCF call to a WCF service. In the devepment environment everything is hosted on the same server. Before each WCF call I have the line of code:

System.Diagnostics.Trace.CorrelationManager.ActivityID = Guid.NewGuid

Any trace messages I write using commands of the form My.Application.Log.WriteEntry use this activity id and i can see these trace messages grouped under the same activityid in the ServiceTraceViewer. However, all logs events created by WCF have the default activityid so are not grouped with my custom trace messages.

In my config file I have the propogateActivity attribute set to True so i am not sure what I am doing wrong.

Any help would be much appreciated.


Nigel Tunnicliffe

Nigel T

View Complete Post

More Related Resource Links

Request is redirected to default Web-Service page (possible cookie issue)


I have a strange problem on my web-service application:
 - when I am initating a web-service request from my client app, no matter if I am using IIS or ASP.NET development server, I'm getting the folowing exception:


System.ServiceModel.ProtocolException: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '


    <head><link rel="alternate" type="text/xml" href="/TestWebSvc.asmx?disco" />

    <style type="text/css">
        BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; }
        #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; }


 - in my client's app.config file I have pointed to an address like the following one: http://localhost/WebSvc/TestWebSvc.asmx .

 - I have installed SnifferHttpModule (http://geekswithblogs.net/robp/archive/2008/05/13/creating-a-sniffer-for-asp.net.aspx) to see the requests and responses of my web-service,

extra request to a default page on a callback


Hello guys,

I have a following issue on production server (the development environment is free of it) And it's only happening in Internet Explorer.

I add callback to a page in the old-fashioned way -> Page.ClientScript.RegisterClientScriptBlock(...)

The scenario is:

1) The default page is being loaded. On Page_OnLoad it assigns a NULL to some session key. Let's call it Control -> Session["Control"] = null;

2) User presses a button and gets redirected to a next page (let's call it NextPage.aspx) using javascript event -> window.location.assign(....) (also tried .href = ... - no help)

3) The NextPage.aspx assigns some value to Session["Control"] on Page_OnLoad

5) User clicks a button on the NextPage.aspx and a callback request is being sent to a server....

TA DA!!! The interesting part:

6) Along with the request to the NextPage.aspx another request is being sent to the default page.

7) The only response is being recieved by a client is a response from the NextPage.aspx BUT since the code on the default page is being executed it puts null to the Session["Control"] which screws all my following scenario. the default page doesn't recognize the request as a callback? so if(IsCallback) {} doesn't he

By default row size allocated in a table

What is the by default row size allocated in a table on HDD in sql server.

Internet Explorer always firing off a default GET request


Hey guys, 

I'm developing a pretty standard MVC application.. I've set the routing up as follows:

        public static void RegisterRoutes(RouteCollection routes)

                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Stock", action = "NewLines", id = UrlParameter.Optional } // Parameter defaults


Everything works perfectly in all browsers - apart from IE. If I am on, say, Stock/Index/, it will fire the Stock/Index/ GET request, then fire the Stock/NewLines/ request afterwards..

Obviously this isn't desired behaivour - as I understand it, the default route value is for when the router can't find the requested controller/action/route, and so sends the request there..

Can't seem to find any info on the web about this, anyone got any clues?

Parsing Dynamic Activity Argument Default Values


Is it possibly to access the default value of a dynamic activity's argument through the API? I would like to do this outside of the scope of execution.

So far I've attempted to load the XAML as a DynamicActivity and access the individual DynamicActivityProperty types. In a DynamicActivityProperty, there is a Value property, but it returns a type of InArgument with actual type of the argument set as a generic. I would like to get the actual value of the InArgument, rather than InArgument<T>. I would assume this would be the actual default value of my argument.

The code I have so far looks something like this:

      System.Activities.Activity activity = null;
      DynamicActivity dynActivity = null;

      // Get bytes from string .xaml
      using (Stream stream = new MemoryStream(ASCIIEncoding.Default.GetBytes(xamlString)))
        activity = ActivityXamlServices.Load(stream);

      dynActivity = activity as DynamicActivity;

      // Iterate through workflow arguments
      foreach (Dy

Default ASP.NET Architecture

In providing an architectural approach, some assumptions are made concerning the project goals. These assumptions should be used as a litmus test to determine if the described architecture may be an appropriate fit for your ASP.NET application.



Dear gentlemen and ladies of the Microsoft Dynamic Data Team,

Mr. Steve Naughton says (and I hope so) that there might be chances that you read the posts published in this forum: I really hope so.

If that were the case then I am formally requesting to you in providing a "real answer" to my question:

I want to customize a dynamic data page (the details one) so I can have access to the data it has been already gathered from the end user UI (details.aspx) and use it to pass this same data to the following controls/pages that I am going to display next time to the end user.

For instance:

I have a screen with different types of data in it: texts, numbers, dates, check boxes, radio buttons and dropdownlists that has been filled with data by the end user. I want now to reset all fields exept the dropdownlist of which I'd like to keep the previously chosen values(the very same thing you do between dropdownlist of List.aspx ad Details.aspx). Even with FoxPro I could do that because data and controls were available there. It was as simple as setting carrying on to true.


I have found my

view state vs request parameters


If  the view state is the data entered into the form fields then they are supposed to be available in the request parameters or request body. Then why would we need view state for?


Unique ID throughout entire request



I am hoping somene here could advise me on a better solution to my present problem.  First a little background information on the application. 

I have a web application using the 3.5 framework.  The structure of this application is as follows: UI -> WebService   -> Business Layer -> DataAccess Layer.   What I want to accomplish is for every request (click on a link or button) have a unique identifer that follows this request through its entire lifecycle.  This unique identifer can be accessible anywhere within this request.  We use Response.Redirects which could easily be changed to Server.Transfers (although I do not want to do that) but  the problem lies with the web service calls.  Currently, a GUID is set in the ApplicationRequest.  This GUID checks for a guid value in the RawURL and if so, assigns this value to a HttpContext Item.  If not, HttpContext.Items gets a new one created.  However, this idea is wrong and will need to be revisisted.  The bigger problem is with the web service calls.  Without changing every web service method signature, and every call for that matter, is there a way of getting this GUID there.  I created a web method in every web service so that each time I instantiate a web service object in the UI, before calling any

Setting the default start page in godaddy hosting?


 How do you set the start page with godaddy hosting? I can see no way of doing this! You do not seem to have access to the IIS settings that allow you to change it!

default constructor SelectList




dont have a  default constructor

new SelectList() :(

How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPerm


Good Day all,

Having an issue with an outside user accessing my IIS7 box. I do not have this problem when running the website from my host machine. I found this post: Http://forums.asp.net/t/1371394.aspx. I assure you that this is not a solution because I am not storing any of my files on a network share. 

What do you think my approach should be. 

I already have read rights to IIS user to my BIN folder. 

Thanks for the help. 

IIS request filtering module


Hi folks,

I have migrated my web application to iis 7.5 Now I am using windows 7 as dev machine.

the problem is it takes several seconds to download a single page into web browser now. It contains only 300 records.

Everything is ok on prod website though. Prod version contains up to 200000 records .I can't also use code profile tool of red gate to analyze possible bottlenecks since the software in question can't restart IIS. No errors in IIS logs. I am using ISAPI Rewrite 3 filter by Helicon to apply some URL rewriting rules. I am thinking about conflict between ISAPI rewriting rules and default IIS 7.5 request filtering rules, since the IIS request filtering module gets a higher priority than even the built-in IIS 7.5 rewriter module. Is it possible to tweak the module through web.config so that priority is given to ISAPI rewriting rules or something like that?

Frankly, I spent several days to figure out solution. No success...

I've also deployed the application on IIS 5.1. Everything works fine. Any ideas about possible solution for IIS 7.5?

How to implement custom HttpContext for each request under class that implements IHTTPHandler


Hello All,

I created an application and implemented IHTTPHandler for all incoming request ending with ".aspx" extension.

Under "ProcessRequest" module, I am creating an instance of HttpContext (with URL attributes different from my application's URL i.e. if I am working on localhost then speciying Yahoo.com as its URL) and assigning it to "context" which comes as method argument.

After redirection, an error is generated. Also, the custom HTTPContext is not passed to the requested page (default.aspx, in my case.)

Code is as follows.

    Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest
            Dim requestedUrl As String
            Dim targetUrl As String
            Dim urlLength As Integer
            'Save settings which will be used while redirecting to appropriate page
            requestedUrl = context.Request.RawUrl
            If requestedUrl.IndexOf("?") >= 0 Then
                targetUrl = requestedUrl.Substring(0, requestedUrl.IndexOf("?"))
                targetUrl = requestedUrl
            End If
            If targetUrl = Nothing Or targetUrl.Length = 0 Then
                targetUrl = requestedUrl
            End If

Default page for my Forlder(product)?


Hai all,

         I need to show the URL like this http://www.saffronrouge.com/face/moisturizers

for me  http://www.mysite.com/products/

i need to list all the products. please help me on this.

Setting default localization



I ever thought that I can set a default localization if the users one (which is set in the browser) isn't available.

I've implemented my localresource files for localization. The start.aspx.resx contains all texts and elements for German use and the start.aspx.en.resx for English users. When I switch the language in the browser settings from German to English everything works fine and the english text is displayed. But when I switch to an other language which is not German or English, it takes defaulty the german resource files.

I've set

UICulture="auto:en-US" Culture="auto:en-US"

as well, but it didn't assume the .en resource file automatically. (For example when I enter the website and switch the browser language to French or Italian it should take the english resource files.)

Thanks and regards,

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