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

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

SessionID is coming in with lowercase 's'

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net

Normally, when my server gets an invalid sessionID on the url it rewrites it.  However (several?) search engine(s) are sending requests to my server with a lower case in the session number, where there is normally an upper case S.  So for example

(s(vou3fq454gk3fbrncrmk1bmj)) will not just rewrite the sessionID and keep going, but

(S(vou3fq454gk3fbrncrmk1bmj)) WILL rewrite the sessionID and keep going without an error.

This is filling up my database and making it hard for me to use it effectively, plus, I would just like it to work.

Is there any way for it is not care if that first '(s(' is lower case?  Or is there a way for IIS to cope with this in an efficient manner?

Thanks for any suggestions.

View Complete Post

More Related Resource Links

sessionID in some search engines coming in lower case (s( - bombing out

Is it possible to ignore case on the sessionID?  Is it useful/secure to do so?  I have a bothersome search engine hitting my site with session id's that have a lower case "s" in the ID, so it looks like - (s( -  at the beginning of the id, rather than - (S( -   It's filling up my error handling database with page not found because of it!  Does anyone have any good suggestions on how I might fix this?  Thanks bunches!

Editor's Note: Coming Out the Other Side


The worst is over for technology job-seekers, says Dice.com executive.

Keith Ward

MSDN Magazine March 2010

Getting SessionID from channel


I need to set ASP.NET_SessionId in order to dowload a file from server.

I use the following code

IContextChannel mychannel = (IContextChannel)myService;
using (OperationContextScope scope = new OperationContextScope(mychannel))
  res = myService.DoSomething();
  System.ServiceModel.Channels.MessageProperties messageProperties = System.ServiceModel.OperationContext.Current.IncomingMessageProperties;
  if (messageProperties.Count > 0)
    HttpResponseMessageProperty httpResponseMessageProperty = (HttpResponseMessageProperty)messageProperties[HttpResponseMessageProperty.Name];
  if (httpResponseMessageProperty != null)
  sessionCoookie = httpResponseMessageProperty.Headers[System.Net.HttpResponseHeader.SetCookie];

It works fine if I use basicHttpBinder.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;

But when I use windows authentication (basicHttpBinder.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;), there are 2 message responses.

The first one HTTP/1.1 401 Unauthorized with "Set-Cookie: ASP.NET_SessionId=sa34zv55sndjgq55fqzaw5ii; path=/; HttpOnly", I can see it in Fiddler and the second one with "WWW-Authenticate: Negotiate oYGgMIGdoAMKAQChCwYJKoZIgvcS

ASP.NET caching headers not coming thru in IIS 6 (but are just fine in dev, which is XP's IIS 5.1

   I have some headers I am stuffing in an ASP.NET httphandler.. They work great in our XP dev environment (IIS 5.1) but on our clients prod boxes (IIS 6.0 running SSL) we aren't getting them.. Below is more detail. Offending Code: context.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1));  context.Response.Cache.SetValidUntilExpires(false);  context.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);  context.Response.Cache.SetCacheability(HttpCacheability.NoCache);  context.Response.Cache.SetNoStore();   on our dev machines (sadly XP so IIS 5.1) the headers I get back are exactly what I want Server: Microsoft-IIS/5.1  Date: Fri, 27 Aug 2010 15:17:40 GMT  X-Powered-By: ASP.NET  X-AspNet-Version: 2.0.50727  Transfer-Encoding: chunked  Cache-Control: no-cache, no-store, must-revalidate  Pragma: no-cache  Expires: -1  Content-Type: application/xml; charset=utf-8    But when I take the same code and run it in production (IIS 6.0 and over SSL) the headers are not coming across correctly at all. Date Fri, 27 Aug 2010 14:59:02 GMT  Server Microsoft-IIS/6.0  mn 1c  X-Powered-By ASP.NET  X-AspNet-Version 2.0.50727  Transfer-Encoding chunked  Cache-Control private  Content-Type application/xml; charset=utf-8  Anyways ideas would be awesome Thanks

How to insert values into my table the data is coming from inline table valued function

Hi all,   i have table oi want insert values into my table the data is coming from inline table valued function how i can use the inline table valued function to insert datainto my table i have inline function which out puts 3 collumns of data how i can insert this data into my table i have the insert statment like below insert into tablename(c1,c2,c3,c4,c5) select ('abc',....................,'xyz') how i can use the out put put of my inline function to  to insert data into my columns c2,c3,c4. please help me out Thanks & Regards Sunil Yoganna

gridview vertical line not coming

hi all, i have an Grdiview within that two table is there, one is for header another is for body section, now the horizontal line  is coming on the gridview but vertical line is not coming, below is my code <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"                             CellSpacing="1"  CellPadding="0" AllowPaging="True" PageSize="200"                             CssClass="searchResult" OnRowCommand="GridView1_RowCommand"                             OnRowDataBound="GridView1_RowDataBound"> <HeaderStyle CssClass="searchResultHeader" HorizontalAlign="Center"/><RowStyle BackColor="#ecf5ff" ForeColor="#333" Font-Size="11px" Height="30px"/>                     &n

Im trying to print the content of a listbox1 but the printing is false so all the pages coming out f

 ManagementObjectSearcher mosPrinter = new ManagementObjectSearcher("SELECT * FROM Win32_Printer");                 foreach (ManagementObject moDiskete in mosPrinter.Get())                 {                     foreach (PropertyData p in moDiskete.Properties)                     {                           // listBox1.Items.Add(p.Value);                         listBox1.Items.Add(String.Format("{0}: {1}", p.Name, p.Value == null ? "NULL" :myprint.DocumentName=p.Value.ToString()));                      //   myprint.DocumentName = p.Value.ToString();                     

Display records in bold coming from mysql database

hi,I have Mysql database.In that some records status is New.now,I bind database table to Listview(asp) control.What's my problem is,the New status records(from Mysql database) text in Listview(after binding) is visible in bold format.how to do this??Thanks in advance.

What is the Regex pattern of SessionId

Hi asp.net 4.0 I wonder what the Regex pattern for session id is?

*When are SQL Server 2005 sp4 & SQL Server 2008 SP2 coming in market*

Hi all, Can anybody tell me, when are SQL Server 2005 sp4 & SQL Server 2008 SP2 coming in the picture? Thanks, Abhishek

SSRS Report issue blank page is coming

I have a report with 2 pages, some time the second page doesnot contain the data at that time i want to get only 1 page report. but as of now if second page does not have data it is coming as blank, can anyone help on this. I am using ssrs 2008Jeeva Jacob

In SSRS 2005 in y-axis i want to display only those dates which are coming from select statement one

For example in select statement:   select date  from Employee   Now i want to show only this date field in y-axis in ssrs 2005, how can i resolve this issue?

DataRows Coming cotinuoulsy in flat file

Hi, Iam using flat file destination using a flat file connection manager to write data into a file with .FILE extension. The source data is of a single column of width 40 characters. When setting up connection manager, I used Fixed Width mode and also used CR-LF as Header row terminator. The source is from a Stored procedure witha table select which returns data with 40 characters width. But when I execute the package and open the file using notepad I can see that all the rows are coming one after the other instead of one below the other. I have been trying to solve the issue, but am not able to. Can some one help where I would have gone wrong. Regards, Sreekanth

Count of files not coming correctly.



I have a folder, which contains sub folders. For example: Doc is the root folder. Inside it has 2 sub folders named Doc1 and Doc2.

Doc1 contains 2 sub folders - fol1 and fol2.

"fol2" folder does not contain any files, where as foc1 has a file in it. I am trying to get the count of files modified in last 30 days. Against each of the sub folders i want to show the count of modified items. Though "fol2" folder does not contain any files, I am getting the count as 1. "fol1" folder is also showing count as 1, as it has file modified in last 30 days. 

I am missing a small part of updation, but not sure where it is. This is the code i have used:

 static int CountFilesInFolder(SPFolder folder, DateTime startDate)
 int count = 0;
if (folder != null && folder.Name.CompareTo("Forms") != 0)
 if (folder.SubFolders != null)
 if (folder.SubFolders.Count != 0)
 foreach (SPFolder item in folder.SubFolders)
 count += CountFilesInFolder(item, startDate);
 item.Item["Files_Count"] = count;

foreach (SPFile item in folder.Files)
    if (item.TimeLastModified >= startDate)
  return count;


Thank you

How do I keep an unique SessionID between my AppWeb and webService


Hello friends I need your help,

I have a simply appWeb (C# VS2008), it make some calls to different webServices, then each one the WS and the appWeb keep logging constantly your activity in a file text. This files contains the sessionID like the follow example:

[Time] | [SessionID] | [Source] | [Message]

9.00 | oha5rl45slcbyd55r3uicq55   | AppWeb | LoginUser

9.01 | oha5rl45slcbyd55r3uicq55   | AppWeb | OpenPage test.asmx

9.02 | oha5rl45slcbyd55r3uicq55   | AppWeb | ClosePage test.amx

9.02 | oha5rl45slcbyd55r3uicq55   | AppWeb | Invoke webService uno.asmx

9.03 | ddgodn455qdvcl45nfurbb45 | WebService uno | Create DB

9.03 | ddgodn455qdvcl45nfurbb45 | WebService dos | Receive call to method getObjects()

Problem with InfoPath 2007 Form opened with InfoPath 2010 - whole number integer not coming into dat


I found an issue when testing existing InfoPath 2007 forms via the Infopath 2010 Designer client.  Integer fields in the form template are publishing to a SharePoint Forms Library and show in the default view.  However, if that library is then used as a Data Connection in another or same form template those integer fields are not displaying or available for selection. 

This is not a problem using the InfoPath 2007 client.  It is not an option to convert the field to text as it could affect existing forms in existing libraries.  Also, existing integer fields are no longer appearing in previously defined SharePoint-based secondary data connections.  Only the ID field still appears.  But, those existing fields still work in the form and are selectable for functions, etc.

Is there a solution to this?

Thanks much!  Mike - www.ProgramNetInc.com


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