Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Wednesday, March 28, 2012

Named Pipes Provider, error: 40 - Could not open a connection

Ok,
I've spent a bunch of hours trying to figure out how to connect to SQL
Server 2005. I have MSDE 2005, IIS 6.0 and ASP.NET configured on my laptop.
I can run ASP.net code with no problem. I can access SQL Server from the
command line using osql with no problem.
But trying to access sql server 2005 from asp.net yields the following
message:
System.Data.SqlClient.SqlException: An error has occurred while establishing
a connection to the server. When connecting to SQL Server 2005, this failure
may be caused by the fact that under the default settings SQL Server does not
allow remote connections. (provider: Named Pipes Provider, error: 40 - Could
not open a connection to SQL Server)
Can someone help me with this? I have both tcp/ip and named pipes enabled.
--
ThanksCan you post your connection string?
specifying
Network=DBMSSOCN
in your connection string will cause it to use tcp instead of named pipes,
which is less error prone.
See here for more details:
http://www.aspfaq.com/show.asp?id=2126
Also, check out the post regarding connections to sql express.
http://www.aspfaq.com/sql2005/show.asp?id=3
HTH
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Greg" wrote:
> Ok,
> I've spent a bunch of hours trying to figure out how to connect to SQL
> Server 2005. I have MSDE 2005, IIS 6.0 and ASP.NET configured on my laptop.
> I can run ASP.net code with no problem. I can access SQL Server from the
> command line using osql with no problem.
> But trying to access sql server 2005 from asp.net yields the following
> message:
> System.Data.SqlClient.SqlException: An error has occurred while establishing
> a connection to the server. When connecting to SQL Server 2005, this failure
> may be caused by the fact that under the default settings SQL Server does not
> allow remote connections. (provider: Named Pipes Provider, error: 40 - Could
> not open a connection to SQL Server)
> Can someone help me with this? I have both tcp/ip and named pipes enabled.
> --
> Thanks|||The connections string is:
Cn = new SqlConnection("Network=DBMSSOCN;Data Source=192.168.1.103;Initial
Catalog=sqlexpress;Integrated Security=SSPI");
The new error message I get is:
(provider: TCP Provider, error: 0 - No connection could be made because the
target machine actively refused it.)
The detail is as follows:
System.Data.SqlClient.SqlException: An error has occurred while establishing
a connection to the server. When connecting to SQL Server 2005, this failure
may be caused by the fact that under the default settings SQL Server does not
allow remote connections. (provider: TCP Provider, error: 0 - No connection
could be made because the target machine actively refused it.)
It appears that the connection is blocked but I'm not sure where. I've
checked Windows Firewall and made sure that the appropriate ports are open...
--
Thanks
"Ryan Powers" wrote:
> Can you post your connection string?
> specifying
> Network=DBMSSOCN
> in your connection string will cause it to use tcp instead of named pipes,
> which is less error prone.
> See here for more details:
> http://www.aspfaq.com/show.asp?id=2126
> Also, check out the post regarding connections to sql express.
> http://www.aspfaq.com/sql2005/show.asp?id=3
> HTH
> --
> Ryan Powers
> Clarity Consulting
> http://www.claritycon.com
>
> "Greg" wrote:
> > Ok,
> >
> > I've spent a bunch of hours trying to figure out how to connect to SQL
> > Server 2005. I have MSDE 2005, IIS 6.0 and ASP.NET configured on my laptop.
> > I can run ASP.net code with no problem. I can access SQL Server from the
> > command line using osql with no problem.
> >
> > But trying to access sql server 2005 from asp.net yields the following
> > message:
> >
> > System.Data.SqlClient.SqlException: An error has occurred while establishing
> > a connection to the server. When connecting to SQL Server 2005, this failure
> > may be caused by the fact that under the default settings SQL Server does not
> > allow remote connections. (provider: Named Pipes Provider, error: 40 - Could
> > not open a connection to SQL Server)
> >
> > Can someone help me with this? I have both tcp/ip and named pipes enabled.
> >
> > --
> > Thanks|||Check out this link.
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
This is a post that explains exactly how to enable remote connections for
express.
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Greg" wrote:
> The connections string is:
> Cn = new SqlConnection("Network=DBMSSOCN;Data Source=192.168.1.103;Initial
> Catalog=sqlexpress;Integrated Security=SSPI");
> The new error message I get is:
> (provider: TCP Provider, error: 0 - No connection could be made because the
> target machine actively refused it.)
> The detail is as follows:
> System.Data.SqlClient.SqlException: An error has occurred while establishing
> a connection to the server. When connecting to SQL Server 2005, this failure
> may be caused by the fact that under the default settings SQL Server does not
> allow remote connections. (provider: TCP Provider, error: 0 - No connection
> could be made because the target machine actively refused it.)
> It appears that the connection is blocked but I'm not sure where. I've
> checked Windows Firewall and made sure that the appropriate ports are open...
> --
> Thanks
>
> "Ryan Powers" wrote:
> > Can you post your connection string?
> >
> > specifying
> > Network=DBMSSOCN
> > in your connection string will cause it to use tcp instead of named pipes,
> > which is less error prone.
> >
> > See here for more details:
> > http://www.aspfaq.com/show.asp?id=2126
> >
> > Also, check out the post regarding connections to sql express.
> > http://www.aspfaq.com/sql2005/show.asp?id=3
> >
> > HTH
> >
> > --
> > Ryan Powers
> > Clarity Consulting
> > http://www.claritycon.com
> >
> >
> > "Greg" wrote:
> >
> > > Ok,
> > >
> > > I've spent a bunch of hours trying to figure out how to connect to SQL
> > > Server 2005. I have MSDE 2005, IIS 6.0 and ASP.NET configured on my laptop.
> > > I can run ASP.net code with no problem. I can access SQL Server from the
> > > command line using osql with no problem.
> > >
> > > But trying to access sql server 2005 from asp.net yields the following
> > > message:
> > >
> > > System.Data.SqlClient.SqlException: An error has occurred while establishing
> > > a connection to the server. When connecting to SQL Server 2005, this failure
> > > may be caused by the fact that under the default settings SQL Server does not
> > > allow remote connections. (provider: Named Pipes Provider, error: 40 - Could
> > > not open a connection to SQL Server)
> > >
> > > Can someone help me with this? I have both tcp/ip and named pipes enabled.
> > >
> > > --
> > > Thanks|||Excellent! I had to change from dynamic to static TCP port number. It works
great now.
Thanks for all your help
Greg
"Ryan Powers" wrote:
> Check out this link.
> http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
> This is a post that explains exactly how to enable remote connections for
> express.
>
> --
> Ryan Powers
> Clarity Consulting
> http://www.claritycon.com
>
> "Greg" wrote:
> > The connections string is:
> > Cn = new SqlConnection("Network=DBMSSOCN;Data Source=192.168.1.103;Initial
> > Catalog=sqlexpress;Integrated Security=SSPI");
> >
> > The new error message I get is:
> > (provider: TCP Provider, error: 0 - No connection could be made because the
> > target machine actively refused it.)
> >
> > The detail is as follows:
> > System.Data.SqlClient.SqlException: An error has occurred while establishing
> > a connection to the server. When connecting to SQL Server 2005, this failure
> > may be caused by the fact that under the default settings SQL Server does not
> > allow remote connections. (provider: TCP Provider, error: 0 - No connection
> > could be made because the target machine actively refused it.)
> >
> > It appears that the connection is blocked but I'm not sure where. I've
> > checked Windows Firewall and made sure that the appropriate ports are open...
> >
> > --
> > Thanks
> >
> >
> > "Ryan Powers" wrote:
> >
> > > Can you post your connection string?
> > >
> > > specifying
> > > Network=DBMSSOCN
> > > in your connection string will cause it to use tcp instead of named pipes,
> > > which is less error prone.
> > >
> > > See here for more details:
> > > http://www.aspfaq.com/show.asp?id=2126
> > >
> > > Also, check out the post regarding connections to sql express.
> > > http://www.aspfaq.com/sql2005/show.asp?id=3
> > >
> > > HTH
> > >
> > > --
> > > Ryan Powers
> > > Clarity Consulting
> > > http://www.claritycon.com
> > >
> > >
> > > "Greg" wrote:
> > >
> > > > Ok,
> > > >
> > > > I've spent a bunch of hours trying to figure out how to connect to SQL
> > > > Server 2005. I have MSDE 2005, IIS 6.0 and ASP.NET configured on my laptop.
> > > > I can run ASP.net code with no problem. I can access SQL Server from the
> > > > command line using osql with no problem.
> > > >
> > > > But trying to access sql server 2005 from asp.net yields the following
> > > > message:
> > > >
> > > > System.Data.SqlClient.SqlException: An error has occurred while establishing
> > > > a connection to the server. When connecting to SQL Server 2005, this failure
> > > > may be caused by the fact that under the default settings SQL Server does not
> > > > allow remote connections. (provider: Named Pipes Provider, error: 40 - Could
> > > > not open a connection to SQL Server)
> > > >
> > > > Can someone help me with this? I have both tcp/ip and named pipes enabled.
> > > >
> > > > --
> > > > Thanks

Monday, March 26, 2012

Named Pipe Connection through ASP - HELP!

We have a problem with interfacing a dll which is called through an Active Server Page. Our network infrastructure uses Named Pipes on Windows 2000 with SQL Server 2000 IIS version 5.0 and MDAC 2.5.

When the ASP calls the dll which (should) insert a new record into a SQL table via a stored procedure call (wrapped as a COM object), we receive the following error:

80004005 SQL Server does not exist or access denied error.

We have tried running this from the Server Admin account, but makes no difference. If we use TCP/IP the mechanism works fine, unfortunately this is not a route we can utilse without significant overall network security implications.

Any advice much appreciated!As you probably know, that's a generic error code. It could be network problems (firewall etc), file permissions or location, or any number of other things. This link shows some of the possible causes (http://support.microsoft.com/support/kb/articles/Q169/3/77.ASP?LN=EN-US&SD=gn&FR=0&qry=80004005&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=SQL).

Wednesday, March 21, 2012

n tier ??

Hello all,

Q1:In all asp.net books the authors would tell you to seperate your presentation , business, and data layer but why does the wizards for the sql data source combine the presentation layer with the data layer?

Q2:Is there a way to retreive a dataset after you execut the sqldatasource.insert() command? ......I have a store procedure(sp) that i am using for inserting records. The sp is where i 'm validating all my data (shop standard) for example, ssn length, last name <> 0 etc. If there are any errors i grab all the error code from another table and return it. I can't seem to figure out how to get the dataset...

Q1: Separating the 3 tiers is just the basic rule to keep things simple. In an Enterprise application, each tier will be split in sub tiers, ending in douzans of tiers. In the same way, in a small web app (which is what the wizards are for, not large scale enterprise stuff, not even medium), you still separate everything, but in a much smaller scale:

Dataset: Data layer. Datasource and code behind -> logic. ASPX file -> presentation.

Thats only valid for very small scale things though. A better way is to put your logic and data layer elsewhere, and wrap them in an object datasource. Then you can still use the wizards, while separating stuff for real.

Q2: Yeah its possible, but I'd suggest looking at the Object Datasource. For more complicated logic, it is much better to make a class with your 4 methods that handle all the ADO.NET in code, and then use an object datasource to bind it to your grids, dataviews, etc.

|||thanks for the info|||

cheetoz:

Q1:In all asp.net books the authors would tell you to seperate your presentation , business, and data layer but why does the wizards for the sql data source combine the presentation layer with the data layer?

I had the same experience, but then I found this:

http://www.asp.net/learn/dataaccess/default.aspx?tabid=63

Monday, March 12, 2012

Mysterious Date Problem

Is there a way to either set Sql Server 2000 or ASP.net datetime fields to a standard format. The problem is that I am passing correct datetime fields using stored procedures and keep getting "Cannot convert datetime into string". It seems to me that many other developers are having that same problem. I tried alot of different methods and still have the same problem. I'm using c# and I never had a problem with datetime fields when I was using vb.net. The problem is that SQl Server is returning datetime formats that are not compatible with c#. I have code that works in other projects but when I try to use that same code I get that conversion error. How do I set the datetime in SQl Server and ASP.Net when I run queries so that the datetime output is in mm/dd/yyyy?What is the statement where you get the error "Cannot convert datetime into string"|||well anytime I return a dataset and bind it to a datagrid I get a conversion error. Sometimes I even got 'The conversion of a char data type to a datetime data type resulted in an out-of-range'. When I ran a simple query in Query Analyzer like "select convert (datetime,'12/20/2003',101)" the output returns 2003-12-20 00:00:00.000
What I need is to be mm/dd/yyyy. Is there a way to change the default setting in Sql Server to that particular format instead of yyyy-mm-dd. Because I think C# is using mm-dd-yyyy as a default. In the asp net datagrid all I'm doing it just binding the dataset to the grid and I get that error? Thanks for your reply...|||you should do the formatting at the front end...for instance when you bind the result set to the datagrid...you can use the dataformatstring property of the datagrid columns to format it to mm/dd/yyyy format which is much simpler rather than enforcing the sql server to some other format..

hth|||Yah, I used that format and that is not the problem. The problem is that I can't even bind the dataset to the datagrid. Its in the binding that is causing the error. But thanks anyway.|||What is the code that you are using??|||basically I just call pass parameters to a method and it returns a dataset

datagrid.DataSource = ds;
datagrid.DataBind();

public DataSet GetOriginationReport( DateTime dtStartDate, DateTime dtEndDate)
{
// instantiate connection and command objects
SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["connString2"]);
SqlDataAdapter myCommand = new SqlDataAdapter("rptSelectReport", myConnection);
myCommand.SelectCommand.CommandType = CommandType.StoredProcedure;

myCommand.SelectCommand.Parameters.Add("@.pStartDate", SqlDbType.DateTime );
myCommand.SelectCommand.Parameters.Add("@.pEndDate", SqlDbType.DateTime );

myCommand.SelectCommand.Parameters["@.pStartDate"].Value = dtStartDate;
myCommand.SelectCommand.Parameters["@.pEndDate"].Value = dtEndDate;

DataSet myDS = new DataSet();
myCommand.Fill(myDS,"viewReportPipe");
return myDS;
}

===============================
Stored Procedure
===============================
CREATE PROCEDURE rptSelectReport
(
@.pStartDate DateTime,
@.pEndDate DateTime,
)
As

Select * from viewReportPipe Where AppDate Between @.pStartDate And @.pEndDate|||What result do u get when u run this query in Sql analyzer??
Select * from viewReportPipe Where AppDate Between @.pStartDate And @.pEndDate|||well I get a list of results. The problem is occuring in the binding. When I run the query and bind it to a datagrid it works. But I have sorting enable in the datagrid and when I run that same query and bind it to the grid it fails and gives me that "Cannot convert datetime to string" error. The datefield in the table is "AppDate" and is a datetime datatype and is not null. I know Sequel stores dates internally and is different then what is displayed. I have dates 01/01/1900 as default dates. I just discover that sequel uses that same date as a default date. To me its seems like Sequel is switching datetime formats and C# is not recognizing it as a valid datetime. Thanks for you quick response...|||Also should I changed my select statement and convert the date in the stored procedure
like "select AppDate = convert(datetime,AppDate) from ...|||What value does dtStartDate have??|||dtStartDate has 12/01/2003 12:00:00 AM

and the dtEndDate has 12/31/2003 12:00:00 AM|||I am not sure why you get error??
Cannot convert datetime to string

It must be probably your sorting procedure handling some parameter in wrong manner|||its funny because that what I originally though. I was able to sort by a few columns and it works. But some columns would throw that conversion error. I know I am sorting by the right field name but for some reason and I don't why but Sequel is switching datetime formats. That leads me to my original question that Sequel is returning the recordset as yyyy-mm-dd and and is there a way to change it to mm-dd-yyyy. I notice that other developers are experience the same problem and the answer seems to be that SQl Server and asp.net application have to have the same regional setting(datetime). But I haven't found an answer to change the setting in SQL Server or asp.net application. I know how to change the settings on the server but that doesn't help.|||Post your Sorting code...

MySQLAdmin for mssql

Hey,

I am looking for a asp.net web application witch has the same functionality as MySQLAdmin.
Does somebody know where I can get that (for free)?

ThxHi,

Yes, ASP EM to access SQl Server is available in 2 flavours VB.NET/C#

click here http://www.aspenterprisemanager.com/

Find Demo http://www.aspenterprisemanager.com/appcsharp/Connect.aspx

FREE Download http://sourceforge.net/projects/asp-ent-man/

Hope that helps
Murali Kumar|||Are there alternatives for this one?|||hi,

No, if i come across one other such application i ll let u know.

Murali Kumar

MySQL vs MSSQL

Hi, I've been coding in C#/ASP.NET for a little while now, but I've only ever used MS SQL.
I'm starting a new project at work soon, and our host provides free MySQL databases but charges for MS SQL databases.

What are the pros/cons for each of these databases, and how much conversion would be required in an existing C#/ASP.NET application if I wanted to change from MS SQL to MySQL? I assume the syntax/commands to operate a C# app with MS SQL are different to the ones required to communicate with a MySQL database?

I'll probably stick with MS SQL because it's what I know, but I'd like to get familiar with MySQL as it might come in handy one day.
Thanks, any information is greatly appreciated.

http://dev.mysql.com/tech-resources/articles/migrating-from-microsoft.html|||

awesome. thanks mike

Friday, March 9, 2012

mysql and ASP

Hi all, i've just set up an mysql server on my computer and now i want to
connect to a mysql database with an ASP page but i can't find the correct
connection string. I always get an error that the datasource can not be
found.

ConnString =
"Driver={MySQL};SERVER=mysqlhost;DATABASE=myDB;UID= userID;PASSWORD=pasword"

What's wrong with it?[posted and mailed]

Passero (yanongena@.pandora.be) writes:

> Hi all, i've just set up an mysql server on my computer and now i want to
> connect to a mysql database with an ASP page but i can't find the correct
> connection string. I always get an error that the datasource can not be
> found.
> ConnString =
>"Driver={MySQL};SERVER=mysqlhost;DATABASE=myDB;UID= userID;PASSWORD=pasword"
> What's wrong with it?

No idea, but you are probably more successful in getting an answer if
you ask in a forum devoted to MySQL. You posted your question in groups
related to MS SQL Server.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Wednesday, March 7, 2012

My sqlcache doesn't work consistently under ASP.NET 2.0, any suggestion?

I have some problem with ASP.NET cache, I found other people has similar problem, but I didn't find real solution.

The one bother me most is the SQLCacheDependency doesn't work stable. I insert object in cache and has SQLCacheDependency linked. After a period of time, it stopped working. That means the the object is still in cache, but change on db side doesn't remove the cache entry. I am not sure if it is ASP side or SQL side, I feel it is ASP side.

I am using 2.0 + SQL 2005.

Once the db command notification stop working, you have to restart IIS or clear all items in cache since you don't kno which one is changed.

The following is the code I use to handle the cache :

string cacheKey = LinkSites.GetMappedKey(virtualPath, fileid.ToString()); // this will return a key from virtualPath
if (!String.IsNullOrEmpty(cacheKey)) frd = (FileRecordData)HttpContext.Current.Cache[cacheKey];
if (frd == null)
{
int siteid = 0;
SqlCacheDependency scd = null;
lock (_connection)
{
try
{
SqlCommand sqlcmd = new SqlCommand("select ownerid,id,uniqueid,parentid,category,name,content,dated=isnull(updated,created),created,updated,isdirectory from dbo.link_sourcestore where id=@.id", Connection);
sqlcmd.CommandType = CommandType.Text;
SqlParameter sqlparam;
sqlparam = sqlcmd.Parameters.Add("@.id", SqlDbType.Int);
sqlparam.Value = fileid;

scd = new SqlCacheDependency(sqlcmd);
using (SqlDataReader reader = sqlcmd.ExecuteReader())
{
if (!reader.HasRows) return null;
reader.Read();
siteid = LinkRoutine.Convert(reader["ownerid"], 0);
frd = GetRecordData(reader);
}
}
catch (Exception e)
{
ErrorHandler.Report("GetCachedFileRecord 2 [" + realVirtualPath + "," + virtualPath + "]", e);
return null;
}
}

if (scd != null)

{
frd.CacheKey = cacheKey;
frd.CacheDependency = scd;
HttpRuntime.Cache.Insert(cacheKey, frd, scd, Cache.NoAbsoluteExpiration, new TimeSpan(24, 0, 0), CacheItemPriority.NotRemovable, new CacheItemRemovedCallback(LinkCacheHandler.RemovedCallback));
}
}

It just read the record and add into cache, when cache item removed, call the static method RemovedCallback in LinkCacheHandler, LinkCacheHandler is posted below. After I restart IIS, it will work for a while, 5, 10 or more minutes, but after a while, even I set breakpoint in RemovedCallback, I don't get anything when I change the record. (when I call my clear cache method, which will remove all records from cache, it runs to the breakpoint. So the callback is fine)

public class LinkCacheHandler
{
public static void RemovedCallback(string k, object v, CacheItemRemovedReason r)
{
if (!k.Contains("system/cache.ascx"))
{
LinkSites._cacheLog += "RemovedCallback[" + DateTime.Now.ToString() + "]<br/> " + k + ((v is FileRecordData)?(" : " + ((FileRecordData)v).CacheKey) : "") + " " + r.ToString() + "\n<br/>";
LinkSites.NotifyCacheObject(k);
}
}
}

It is me again.

I found a hotfix for this : http://support.microsoft.com/kb/913364/en-us#appliesto

I asked this question if not for a year, I will say at least more than half year. Noone from microsoft response. And today I finally find the hotfix. You bet it is not easy to find it, they seems try to hide it.

It is a big problem! it happens to many users!

My sqlcache doesn't work consistently under ASP.NET 2.0, any suggestion?

I have some problem with ASP.NET cache, I found other people has similar problem, but I didn't find real solution.

The one bother me most is the SQLCacheDependency doesn't work stable. I insert object in cache and has SQLCacheDependency linked. After a period of time, it stopped working. That means the the object is still in cache, but change on db side doesn't remove the cache entry. I am not sure if it is ASP side or SQL side, I feel it is ASP side.

I am using 2.0 + SQL 2005.

Once the db command notification stop working, you have to restart IIS or clear all items in cache since you don't kno which one is changed.

The following is the code I use to handle the cache :

string cacheKey = LinkSites.GetMappedKey(virtualPath, fileid.ToString()); // this will return a key from virtualPath
if (!String.IsNullOrEmpty(cacheKey)) frd = (FileRecordData)HttpContext.Current.Cache[cacheKey];
if (frd == null)
{
int siteid = 0;
SqlCacheDependency scd = null;
lock (_connection)
{
try
{
SqlCommand sqlcmd = new SqlCommand("select ownerid,id,uniqueid,parentid,category,name,content,dated=isnull(updated,created),created,updated,isdirectory from dbo.link_sourcestore where id=@.id", Connection);
sqlcmd.CommandType = CommandType.Text;
SqlParameter sqlparam;
sqlparam = sqlcmd.Parameters.Add("@.id", SqlDbType.Int);
sqlparam.Value = fileid;

scd = new SqlCacheDependency(sqlcmd);
using (SqlDataReader reader = sqlcmd.ExecuteReader())
{
if (!reader.HasRows) return null;
reader.Read();
siteid = LinkRoutine.Convert(reader["ownerid"], 0);
frd = GetRecordData(reader);
}
}
catch (Exception e)
{
ErrorHandler.Report("GetCachedFileRecord 2 [" + realVirtualPath + "," + virtualPath + "]", e);
return null;
}
}

if (scd != null)

{
frd.CacheKey = cacheKey;
frd.CacheDependency = scd;
HttpRuntime.Cache.Insert(cacheKey, frd, scd, Cache.NoAbsoluteExpiration, new TimeSpan(24, 0, 0), CacheItemPriority.NotRemovable, new CacheItemRemovedCallback(LinkCacheHandler.RemovedCallback));
}
}

It just read the record and add into cache, when cache item removed, call the static method RemovedCallback in LinkCacheHandler, LinkCacheHandler is posted below. After I restart IIS, it will work for a while, 5, 10 or more minutes, but after a while, even I set breakpoint in RemovedCallback, I don't get anything when I change the record. (when I call my clear cache method, which will remove all records from cache, it runs to the breakpoint. So the callback is fine)

public class LinkCacheHandler
{
public static void RemovedCallback(string k, object v, CacheItemRemovedReason r)
{
if (!k.Contains("system/cache.ascx"))
{
LinkSites._cacheLog += "RemovedCallback[" + DateTime.Now.ToString() + "]<br/> " + k + ((v is FileRecordData)?(" : " + ((FileRecordData)v).CacheKey) : "") + " " + r.ToString() + "\n<br/>";
LinkSites.NotifyCacheObject(k);
}
}
}

It is me again.

I found a hotfix for this : http://support.microsoft.com/kb/913364/en-us#appliesto

I asked this question if not for a year, I will say at least more than half year. Noone from microsoft response. And today I finally find the hotfix. You bet it is not easy to find it, they seems try to hide it.

It is a big problem! it happens to many users!