How to view user privileges using windows cmd?

[Origin]: http://stackoverflow.com/questions/11607389/how-to-view-user-privileges-using-windows-cmd

I’d start with secedit /export /areas USER_RIGHTS /cfg OUTFILE.CFG. Then examine the line for the relevant privilege. However, the problem now is that the accounts are listed as SIDs, not usernames.

shareedit

This is pretty horrible to use but it works well. After exporting the template using Simon’s command above, you can import it again using: Secedit /configure /db secedit.sdb /cfg outfile.cfg /quiet /areas USER_RIGHTS– NikG Mar 20 ’15 at 17:51

Advertisements

Solution to “Unable to Launch the IIS Express Web Server”

[Origin]: http://sibeeshpassion.com/solution-to-unable-to-launch-the-iis-express-web-server/

This article will help you to overcome the error Unable to Launch the IIS Express Web Server. Today I encountered the issue “Unable to launch the IIS Express Web Server” while I was running my Visual Studio 2012. So I thought of sharing how to resolve that issue. I hope it will help someone.

Unable to Launch the IIS Express Web Server

Background

In my team we have 5 to 10 members. Since we wanted to do a build for our current application, I used “Get the Latest files from the server”. (We are using TFS.) Then when I run my application I was getting this error.

The cause of this error is, someone has checked in the solution file with his port number (the port number he was using). When I took the latest, it was set in my solution file also. We must take the latest solution file only when it is required. So here I will share the remedy for the preceding issue.

Procedure to solve this issue

Step 1

Right-click on your solution and select Properties as shown in the following figure.

 

Unable to Launch the IIS Express Web Server

 

Step 2

Select “Web” from the left menu.

 

Unable to Launch the IIS Express Web Server

 

Step 3

Under “Use local IIS server” change the port number from http://localhost:58030/ to another one.

 

Unable to Launch the IIS Express Web Server

 

Step 4

Here I have changed http://localhost:58030/ to http://localhost:58031/ .

Bingo! We have done it.

 

Unable to Launch the IIS Express Web Server

 

Step 5

Now please run again your application. The issue will be solved.

Conclusion

Did I miss anything that you may think which is needed? Have you ever faced this issue? Does this solution solve your issue?I hope you liked this article. Please share me your valuable suggestions and feedback.

Your turn. What do you think?

A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I am able to.

Kindest Regards
Sibeesh Venu

Unable to launch the IIS Express Web server

[Origin]: http://stackoverflow.com/questions/15873126/unable-to-launch-the-iis-express-web-server

I had the exact same problem.
The reason – bad IIS config file.

Try deleting the automatically-created IISExpress folder, which is usually located at %userprofile%/Documents, e.g. C:\Users\[you]\Documents\IISExpress.

Don’t worry, VS should create it again – correctly, this time – once you run your solution again.


EDIT: Command line for deleting the folder:

rmdir /s /q "%userprofile%\Documents\IISExpress"

shareedit

Model backing a DB Context has changed; Consider Code First Migrations

[Origin]: http://stackoverflow.com/questions/14948205/model-backing-a-db-context-has-changed-consider-code-first-migrations

EF codefirst will look at your DbContext, and discover all the entity collections declared in it(and also look at entities related to those entities via navigation properties). It will then look at the database you gave it a connection string to, and make sure all of the tables there match the structure of your entities in model. If they do not match, then it cannot read/write to those tables. Anytime you create a new database, or if you change something about the entity class declarations, such as adding properties or changing data types, then it will detect that the model and the database are not in sync. By default it will simply give you the above error. Usually during development what you want to happen is for the database to be recreated(wiping any data) and generated again from your new model structure.

To do that, see “RecreateDatabaseIfModelChanges Feature” in this article:http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx

You basically need to provide a database initializer that inherits from RecreateDatabaseIfModelChanges.

Once you go to production and no longer want to lose data, then you’d remove this initializer and instead use Database Migrations so that you can deploy changes without losing data.

shareedit

To solve this error write the the following code in Application_Start() Method in Global.asax.cs file

Database.SetInitializer<MyDbContext>(null);
shareedit