When I am trying to create a new directory in my WPF application i am getting the following error. " 'The invocation of the constructor on type 'NetworkApplication.Login' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'."

this is my line of code " DirectoryInfo di = Directory.CreateDirectory(@"C:\Windows\Newfolder1");"

thanks in advance swati

You don't have permissions to write to the windows directory, and it's bad form anyway.

I want to save licence information of my application in c:\windows along with registry. Is there any way to do this.
thanks
swati

You should save licence information in the ApplicationData folder. Check this out for how to find it.

thanks a lot for the link.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.