Wednesday, February 27, 2013

User does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control restrictions have been addressed

Today I spent quite some time getting rid of a common SSRS error due to a silly mistake, so here I am with it. This might save a bit of your time on a bad day

Error I faced was,
User does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed
Solution,
Add desired users to administrator group on SSRS server
Mistake I did was googling problem straightaway and crying for help before I started thinking myself. With quick google, I got a few suggestions which didn't helped me as they were pointing to same error but occurring possibly due to something else. So here is what helped me, you might need to call IT team for getting this done.

Do login on your SSRS server and open edit local users and groups



 This will open a window where you can add/remove users from a group

  • Select Groups in left pane, this will give you list of groups on your server
  • Now double click Administrators, this will give you a screen like below
  • Here click on Add button and enter name of user to whom you wanna give access
  • Press ok, then apply and there you are. 
  • Problem solved :)  
  • If this doesn't solves your cause, check this nice blogpost from caleb



"swarg jaana ho to khud he marna padta hai", a hindi proverb which traversed my mind when IT guy failed to help me on this :P

Thanks,
Ravi

Friday, February 22, 2013

Can´t upload a new attachement in DNN 6 with forum 5.0.3

Today one of my friend pinged me to help on an issue with DNN forum module(05.00.03), he was using it on DNN 06.01.05. Problem was "Upload new attachment failing repeatedly with some exception". He was getting below exception:

Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: The underlying system threw an exception. ---> DotNetNuke.Services.FileSystem.FolderProviderException: The underlying system threw an exception. ---> System.ArgumentNullException: Value cannot be null. Parameter name: content at DotNetNuke.Services.FileSystem.StandardFolderProvider.AddFile(IFolderInfo folder, String fileName, Stream content) at DotNetNuke.Services.FileSystem.FileManager.MoveFile(IFileInfo file, IFolderInfo destinationFolder) --- End of inner exception stack trace --- at DotNetNuke.Services.FileSystem.FileManager.MoveFile(IFileInfo file, IFolderInfo destinationFolder) at DotNetNuke.Common.Utilities.FileSystemUtils.MoveFile(String strSourceFile, String strDestFile, PortalSettings settings) at DotNetNuke.Modules.Forum.WebControls.AttachmentControl.cmdUpload_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---

So as usual firstly I googled the error and found that many people are having similar error, but none of them were having a solution so I thought that it might be some permissions issue and messed up with folder permissions, but all failed.

So finally I debugged the code and found that line that was breaking was calling method "FileSystemUtils.MoveFile" which got deprecated in DNN 6 

So I replaced it with method call for "RenameFile" and there you go!!

Below is the culprit line under method cmdUpload_Click in file "AttachmentControl.ascx.vb"
FileSystemUtils.MoveFile(ParentFolderName + FileName, ParentFolderName + destFileName, PortalSettings)

 and here is its replacement

DotNetNuke.Services.FileSystem.FileManager.Instance.RenameFile(DotNetNuke.Services.FileSystem.FileManager.Instance.GetFile(DotNetNuke.Services.FileSystem.FolderManager.Instance.GetFolder(PortalId, BaseFolder), FileName), destFileName)


If you are also having this error, then just download the module's source code from codeplex, open it in visual studio, replace lines as I mentioned, build this module. Now go to your filesystem, grab new DLL for forum module and replace it in your DNN apps bin directory.

Sorry I forgot to write earlier, please take backup before doing this to your production site.

Hope this will help!!

Thanks,
Ravi

About Me

My photo
Delhi, India
Fun, music, travel and nature loving, always smiling, computer addict!!