Wednesday, June 20, 2018

Outlook error - You don't have appropriate permission to perform this operation.

If you upgraded outlook to a newer version, maybe you are going to get a problem that you cannot move any mails to personal folder with the error:
"Cannot move the items. You don't have appropriate permission to perform this operation."


The error is because most likely the value of the key pstdisablegrow needs to be changed to allow the pst file to be changed.

To solve the problem:

  • Open the regedit to modify the outlook registry.
  • Locate the following registry key: HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\pst



  • Double click on the Dword pstdisablegrow and change the value from 1 to 0


That should fix the problem.

Monday, May 14, 2018

Error trying to attach a SQL database: CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105)

If you are trying to attach a database using SQL management studio and you get the next error:

CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file

It is because you are not running management studio as an administrator and the account you are using doesn't have the rights to open the database file.

To solve this problem, right click on the SQL management studio shortcut and select:
Run as Administrator

That will let you attach the database.

SQL database stuck going offline

If you are trying to take a database offline and it got stuck, looks like it is not accessible anymore, but it’s not quite offline, you need to kill all the processes related with that Database.

With the next command, see all the processes running and look for the ones related with the database:

EXEC sp_who2

Get each SPID with the DBName database you want to take offline, the use the next command to kill each process

KILL <SPID>

This should solve your problem.

Friday, October 20, 2017

VS 2017 Error - Unable to start program http://localhost An operation is not legal

Scenario
You are trying to debug a web site in Visual Studio 2017

Error
Microsoft visual studio is giving the error: Unable to start program http://localhost An operation is not legal


Solution
Disable the JavaScript debugging

  • On VS go to Tools >> Options
  • Go to Debugging >> General
  • Uncheck the option Enable JavaScript debugging for ASP.NET (Chrome and IE)
  • Click OK and try again

Wednesday, October 18, 2017

VS 2017 MVC Core 2.0 error - Cannot find reference assembly 'Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.exe' file for package Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86

Scenario

After compiling a MVC Core 2.0 project in VS 2017, the browser isn't displaying the site

Error
An unhandled exception occurred while processing the request.

Cannot find reference assembly 'Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.exe' file for package Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86

Solution
Open the .csproj file in a text editor
In the section set the MvcRazorCompileOnPublish tag as true:
      <mvcrazorcompileonpublish>true</mvcrazorcompileonpublish>

Tuesday, October 17, 2017

VS 2017 MVC Core 2.0 publish fails

Scenario
Publish a MVC Core 2.0 project in Visual Studio 2017

Error
Severity
Error
Code
The command ""bin\Release\net461\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.exe"
Description
@"obj\Release\net461\microsoft.aspnetcore.mvc.razor.viewcompilation.rsp"" exited with code 1


Solution
Open the .csproj file in a text editor
In the section set the MvcRazorCompileOnPublish tag as false:
      <mvcrazorcompileonpublish>false</mvcrazorcompileonpublish>

Tuesday, October 10, 2017

MVC Core - Duplicate Content Error after Upgrading Visual Studio 2017

Error

  • Dotnet-aspnet-codegenerator-design has stopped working
  • Duplicate 'Content' items were included. The .NET SDK includes 'Content' items from your project directory by default.
  • Failed to build the project. Please fix the build errors and retry again


Reason

The problem is a change on the RC3 release of Visual Studio 2017, if you have globs in your project and you try to build it using the newest SDK, you'll get the error. Basically your content, such as the files in wwwroot are now getting imported by the default includes that are built-in to Visual Studio and by the manual rules in your csproj file.


Solution 1

Open your web project file .csproj and remove the duplicated items specified in the error message


Basically remove the ItemGroup tag with all the wwwroot paths.



Solution 2

Open your web project file .csproj
Look for the tag
Add the next tag false