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

Recommended Answers

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

Jump to Post

All 4 Replies

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 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.