While doing a tutorial on cache dependency I ran into problems.
The error from the debugger was that my database was not setup for cache dependency.
So I searched on the web and found out you could use aspnet_regsql to fix that.
So I executed this from the cmd:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\aspnet_regsql.exe -S localhost\sqlexpress -E -d Pubs -ed
And I got this responce from the prompt:
Enabling the database for SQL cache dependency.
.
Finished.
All looked fine I thought and I runned the app again.
Again the debugger called me back saying I had to setup the table for cache dependency as well.
So I called the prompt again and pasted in another command but it didn't work the prompt gave me:
C:\....aspnet_regsql.exe is not a valid win32 applicaition and in the prompt an: "Access denied"
I thougth how strange so I looked up the exe to start it up manualy.
Again I received the same error. (And a half hour ago the wizard (UI) still worked by doubleclicking the exe file.....)
Close examination of my Windows explorer showed that the exe has been changed 5 minutes ago. (The time I set SQL dependency on the pubs table...)
And to get more spooky the file is now only 0kb large???
So somehow I feel I killed this exe file and I have no clue on how to fix it. Perhaps I should reïnstall the Framework but I'm not sure if that is a wise thing to do.
You also have to set up your web.config to tell your app what you want to depend on.
Link will help : http://www.ondotnet.com/pub/a/dotnet/2005/01/17/sqlcachedependency.html
Hi Eric,
Thank you for your answer.
That's funny that's actually the same tutorial I was following to Fix my problems I ran in to following ScottGu's excellent tutorial voor Visual Studio tools and SqlServer (Which I have to alter from now and then to comply with VWD rules and SQLExpress) Hate
the tracking cookies on that site BTW... [;)]
But I don't think the issue is how to set up SQL dependency...the tutorials are pretty ok to follow. (Excellent...)
But the thing is with the Exe file that is broken now so I can't set dependency anymore to the table. (Database dependency was succesfull)
So somhow I Fubar't it and now I'm trying to find out how to fix that registering tool to set dependency on the Authors table.
So you do have the settigns in your web config? I dont get how you just messed up your tool. That sounds very odd. You could just replace it with a working one. Are you seeing the pubs make records to look at your dbs or tables? If so then it is working
and your app is just not getting the results back.
Yes I have and I also added the correct page directives in the calling page (.aspx) as well.
Again I have to emphasis that the problem is with the aspnet_regsql.exe. After the successful setup for cache dependency on the pubs database the tool went dead.
If you double-click it then you are supposed to get a UI to change some general stuff on databases. But now (after using the tool to set cache dependency) if you
try to use it (by double-clicking it or by the cmd) you get the following error: “C:\....aspnet_regsql.exe is not a valid win32 application”
IMO this is telling me that the aspnet_regsql.exe is corrupted.
Like I said before the file size of the exe is now 0 kb and the change to that size has the time stamp of the usage of the tool to set cache dependency on the “pubs”
database.
With that knowledge I’m sure the tools is broken and perhaps someone can tell me what is the correct file size of that tool. (cause mines 0 kb now…)
You say replace it with a new one? Do you have a copy of a working one for me? Or a download URL for just that tool?
It sounds like the exe got corrupted somehow. Have you run an anti-virus program on your system lately? The way the .exe turned into a 0 byte file sounds suspiciously like sometype of virus problem.
As eramseur mentioned, the asnet_regsql.exe tool is installed by the .NET Framework 2.0 redist. One way to fix things would be to re-install it.
Hope this helps,
Scott
P.S. Once you enable the database for sqlcachedependencies, you'll then want to run a second command (I think it is the -t flag with aspnet_regsql.exe, although I'm on a relative's PC right now so can't easily check) that will allow you to specify which table
to enable.
Well the exe file is corrupt for sure but I don't think it has anything todo with a virusscan.
Like I mentioned in my first post it got corrupted setting the dependency on the database itself and after trying todo the same for the author tabel windows didn't recognize it anymore. (and the file was changed to 0 kb size)
I'm still running the Beta 2 versions of all products so I think it's time to upgrade to the final release that came out 7 november. (haven't had time to set that up but will soon)
Thanx to the both and I think reinstalling will fix the problem. I'll mark this one solved.
Joost Verdaa...
Member
101 Points
25 Posts
My aspnet_regsql.exe is broken setting cache dependency
Nov 23, 2005 07:27 PM|LINK
Hi,
While doing a tutorial on cache dependency I ran into problems.
The error from the debugger was that my database was not setup for cache dependency.
So I searched on the web and found out you could use aspnet_regsql to fix that.
So I executed this from the cmd:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\aspnet_regsql.exe -S localhost\sqlexpress -E -d Pubs -ed
And I got this responce from the prompt:
Enabling the database for SQL cache dependency.
.
Finished.
All looked fine I thought and I runned the app again.
Again the debugger called me back saying I had to setup the table for cache dependency as well.
So I called the prompt again and pasted in another command but it didn't work the prompt gave me:
C:\....aspnet_regsql.exe is not a valid win32 applicaition and in the prompt an: "Access denied"
I thougth how strange so I looked up the exe to start it up manualy.
Again I received the same error. (And a half hour ago the wizard (UI) still worked by doubleclicking the exe file.....)
Close examination of my Windows explorer showed that the exe has been changed 5 minutes ago. (The time I set SQL dependency on the pubs table...)
And to get more spooky the file is now only 0kb large???
So somehow I feel I killed this exe file and I have no clue on how to fix it. Perhaps I should reïnstall the Framework but I'm not sure if that is a wise thing to do.
Someone got a clue?
Thanx.
Groetjes,
Joost Verdaasdonk
eramseur
Contributor
3702 Points
752 Posts
Re: My aspnet_regsql.exe is broken setting cache dependency
Nov 23, 2005 08:04 PM|LINK
Link will help : http://www.ondotnet.com/pub/a/dotnet/2005/01/17/sqlcachedependency.html
Rainbow Portal 2.0 Admin
Download Rainbow 2.0!!
Rainbow Code
Rainbow Portal Community
C# 2005 Group
Joost Verdaa...
Member
101 Points
25 Posts
Re: My aspnet_regsql.exe is broken setting cache dependency
Nov 23, 2005 09:28 PM|LINK
Hi Eric,
Thank you for your answer.
That's funny that's actually the same tutorial I was following to Fix my problems I ran in to following ScottGu's excellent tutorial voor Visual Studio tools and SqlServer (Which I have to alter from now and then to comply with VWD rules and SQLExpress) Hate the tracking cookies on that site BTW... [;)]
But I don't think the issue is how to set up SQL dependency...the tutorials are pretty ok to follow. (Excellent...)
But the thing is with the Exe file that is broken now so I can't set dependency anymore to the table. (Database dependency was succesfull)
So somhow I Fubar't it and now I'm trying to find out how to fix that registering tool to set dependency on the Authors table.
Later.
Groetjes,
Joost Verdaasdonk
eramseur
Contributor
3702 Points
752 Posts
Re: My aspnet_regsql.exe is broken setting cache dependency
Nov 23, 2005 11:24 PM|LINK
Rainbow Portal 2.0 Admin
Download Rainbow 2.0!!
Rainbow Code
Rainbow Portal Community
C# 2005 Group
Joost Verdaa...
Member
101 Points
25 Posts
Re: My aspnet_regsql.exe is broken setting cache dependency
Nov 24, 2005 10:34 AM|LINK
Hi Eric,
Thank you for your answer.
Yes I have and I also added the correct page directives in the calling page (.aspx) as well.
Again I have to emphasis that the problem is with the aspnet_regsql.exe. After the successful setup for cache dependency on the pubs database the tool went dead.
If you double-click it then you are supposed to get a UI to change some general stuff on databases. But now (after using the tool to set cache dependency) if you try to use it (by double-clicking it or by the cmd) you get the following error: “C:\....aspnet_regsql.exe is not a valid win32 application”
IMO this is telling me that the aspnet_regsql.exe is corrupted.
Like I said before the file size of the exe is now 0 kb and the change to that size has the time stamp of the usage of the tool to set cache dependency on the “pubs” database.
With that knowledge I’m sure the tools is broken and perhaps someone can tell me what is the correct file size of that tool. (cause mines 0 kb now…)
You say replace it with a new one? Do you have a copy of a working one for me? Or a download URL for just that tool?
Thanx.
Groetjes,
Joost Verdaasdonk
eramseur
Contributor
3702 Points
752 Posts
Re: My aspnet_regsql.exe is broken setting cache dependency
Nov 24, 2005 11:36 AM|LINK
Rainbow Portal 2.0 Admin
Download Rainbow 2.0!!
Rainbow Code
Rainbow Portal Community
C# 2005 Group
Joost Verdaa...
Member
101 Points
25 Posts
Re: My aspnet_regsql.exe is broken setting cache dependency
Nov 24, 2005 12:22 PM|LINK
Hi Eric,
Sorry don't use that Tool.
I'm trying VWD Express for now with SQLExpress 2005 and if that works well I think about buying the full tool.
Any other downloading source?
Thank you
Groetjes,
Joost Verdaasdonk
eramseur
Contributor
3702 Points
752 Posts
Re: My aspnet_regsql.exe is broken setting cache dependency
Nov 25, 2005 12:17 AM|LINK
Rainbow Portal 2.0 Admin
Download Rainbow 2.0!!
Rainbow Code
Rainbow Portal Community
C# 2005 Group
ScottGu
All-Star
18285 Points
2008 Posts
Microsoft
Moderator
Re: My aspnet_regsql.exe is broken setting cache dependency
Nov 25, 2005 09:45 PM|LINK
As eramseur mentioned, the asnet_regsql.exe tool is installed by the .NET Framework 2.0 redist. One way to fix things would be to re-install it.
Hope this helps,
Scott
P.S. Once you enable the database for sqlcachedependencies, you'll then want to run a second command (I think it is the -t flag with aspnet_regsql.exe, although I'm on a relative's PC right now so can't easily check) that will allow you to specify which table to enable.
Joost Verdaa...
Member
101 Points
25 Posts
Re: My aspnet_regsql.exe is broken setting cache dependency
Nov 26, 2005 07:45 PM|LINK
Hi Eric and Scott,
Well the exe file is corrupt for sure but I don't think it has anything todo with a virusscan.
Like I mentioned in my first post it got corrupted setting the dependency on the database itself and after trying todo the same for the author tabel windows didn't recognize it anymore. (and the file was changed to 0 kb size)
I'm still running the Beta 2 versions of all products so I think it's time to upgrade to the final release that came out 7 november. (haven't had time to set that up but will soon)
Thanx to the both and I think reinstalling will fix the problem. I'll mark this one solved.
Groetjes,
Joost Verdaasdonk