ASP.NET Failed deploying project on server

If you have error with deploying project on server you might have problem with privileges of exporting files. Add to project_name.csproj file in section PropertyGroup line like bellow: <PropertyGroup> <IncludeSetAclProviderOnDestination>False</IncludeSetAclProviderOnDestination> </PropertyGroup> Tip: If you not see *.csproj in your Solution Explorer just right click on project name and pick Unload Project then another right click […]

Unique name of uploaded files

If you want to prevent situation that you have the same name of upload files use this example: var fileToSave = ┬áDateTime.Now.ToString(“yyyyMMddHHmmssfff”) + “_” + Guid.NewGuid().ToString(“N”) + “-” + SomeYourModelsId + “.pdf”;