Friday, July 1, 2011

The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

When you first deploy your asp.net application to shared server, you could face this error if your application used membership authentication. I have been looking around in the internet for solutions but all of them are not working for me. I tried myself to solve it and fortunately, i did it perfectly. Here is my tried:
1- Make sure when you create database, you remember to add values to aspnet_schemaversions table:
common 1 1
health monitoring 1 1
membership 1 1
personalization 1 1
profile 1 1
role manager 1 1

2-
Remmeber to put applicationName="APPNAME" which APPNAME is the name value in table aspnet_applications in , and in web.config
3- If 2 solutions above don't work, Add slash ("/") before APPNAME both in applicationName and in aspnet_applications.
for example: applicationName="/APPNAME" and in aspnet_application: /APPNAME

good luck and have fun with this error!

Monday, May 10, 2010

Context in minifilter

Here is a definition of context in minifilter. If you are new to minifilter, this is basic for you. I quote this one from osronline.com
To start with you need to understand that a context is a lump of memory which is associated with and object and your filter. So, at least notionally you call one of the FltGetXXXContexts giving it the object and info about your filter and you get back the correct context.

So, what sort of objects can be associated:

> FLT_VOLUME_CONTEXT

This is associate with the "volume". In the case of a physical media you get one volume object (and hence volume context) for every "physical" media (so,one for c:\ one for d:\ and so on). In the network case you get one per network connector (so one for x:, y: & z: if they where connected via SMB and a different one for q: if it was connected via WebDav).

> FLT_INSTANCE_CONTEXT

You can arrange to filter each volume more than once. In that case every time you filter the volume you get a new *instance* and so you can associate an instance context with it. In the majority of cases you will only have one instance per volume and so you may find people use either the instance context or the volume context.

> FLT_FILE_CONTEXT

This is associate with non closed files. For as long as *anyone* has a file open the context stays around. If an application opens a file 30 times, there will still be only one file context. Note that because of the way that caching works file contexts (and stream and stream handle contexts) can
hang around long after the last application has closed the last handle to it. But they do not last forever. This is a new construct and you might want to be careful before using it since some file systems may not support it even in Vista and non do before.

> FLT_STREAM_CONTEXT

This is associate with non closed streams. Remember that in NTFS a file can have multiple streams (c:\a and c:\a:other are two streams on the same file ('a'). If an application opens a stream 30 times, there will still be only one stream context.

> FLT_STREAMHANDLE_CONTEXT

This is associated with a _specific_ instance of an open stream. Specifically it is associated with a FileObject (the data structure that NT uses to deal with open instances. If a file opens a file 10 times then there will be 10 stream handle contexts. There is an edge case to do with
inherited handles, but you can ignore it for now
Note that many streamhandle context can exist for the stream for which there
will be only one streamcontext.
Equally many stream contexts can exist for the file for which there will be only one file context.
And many file contexts can exist for an instance for which there will be only one instance context.
And finally many instance contexts may exist for the volume for which there will only be one volume context

So, if you like there is a level of granularity associated with the type of context.

> FLT_TRANSACTION_CONTEXT

This is somewhat orthogonal since transactions are orthogonal to file and volumes (and indeed have an existence beyond filesystems). When a transaction is create you associate a context with it. Whenever you see that transaction again you can get that context back.


--
Rod Widdowson
Consulting Partner
Steading System Software LLP
+44 1368 850217 +1 508 915 4790

Tuesday, March 30, 2010

Back to my blog

After posting the first entry of this blog, I was very busy, busy with family and my work. And now is time to come back

Sunday, September 13, 2009

Rootkit

Defination: A rootkit is a program designed to hide not only itself, but another program and all its associated resources (processes, files, folders, Registry keys, ports and drivers) (Rootkits.for.Dummies, Larry Stevenson and Nancy Altholz,  Jan,2007)

Rootkit is a combination of Root and Kit. Root prefers to the most powerful privilege in system and kit is a program or utilitie which helps it can maintain its root-level.

Rootkit is available in all systems. First, it is developed and used in Unix-like operating systems. In 1999, Greg Hoglund, the owner of rootkit.com, introduced the first rootkit in Windows NT. The discovery of the Sony Digital Rights Management (DRM) Rootkit by Mark Russonovich of Sysinternals on October 31, 2005 suddenly thrust rootkits from relative obscurity to a position of prominence.

-to be continued-