Cannot debug Sharepoint application using non system account user? - sharepoint

I am using WSPBuilder to develop Sharepoint2007 sites, whenever i try to debug using one of the users that are not System Account, the debugger enters to the breakpoint and waits a step (F10), when i press F10, i get the following exception in the debug output window after pressing F10 on the line having the breakpoint:
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in XXX.dll
An exception of type 'System.Threading.ThreadAbortException'occurred in XXX.dll
but was not handled in user code The thread '<No Name>' (0xfc4) has exited with
code 0 (0x0).
and i am redirected to a page of sharepoint saying:
Go back to site
Error: Access Denied
Current User
You are currently signed in as: SHAREPOINT\ZZZ
Sign in as a different user
When i try to RUN not to DEBUG with the same user, I don't have this problem.
Also when i try to debug using the System Account (MOSS ADMIN), I don't have this problem ?
How to overcome this problem ?
BTW, i am trying to debug a custom ASPX/CS page installed as a feature on the site.
FYI, it's only for this project not for all projects i have, also it's for all pages in this project not only one page.

For those who are interested, I found the solution:
I created a new project and copied my files to it (of course with recreating features), now it works fine. That means that the project itself is the problem not the IDE, perhaps some of its file are corrupted !

You might want to try and add the user SharePoint\zzz to the WSS_WPG and WSS_Admin groups to see if that gets you around the issue. I assume you are doing the debugging on a single, stand alone install so you could also try and make SharePoint\zzz and administrator.

Related

VS Code Keeps Updating

VS Code keeps updating. I think it might be my workstations configuration. I have two accounts assigned to me on the domain for security. One for regular usage and a second with elevated privilege's. I login with the regular and have VS Code configured to always start as Administrator which prompts me for my second elevated user credentials.
Can this be causing the issue and what can I do to help VS Code with the update process?
The key seems to be the shortcut to open VS Code. The properties for the shortcut showed it was opening and running in my regular login account profile directory. When I switched the shortcut to my elevated profile account the updates stopped happening every time I opened VS Code.

How do I get my application to run with administrator rights automatically?

I've made a console application that is supposed to update some registry entries so that I can access 32 bit COM components from a 64 bit application. If I have admin rights, it works great, but I can't seem to get the application run with admin rights out of the box.
This is what I've done.
Create a Windows Console Application.
Add my code.
Right click on my project and select Properties.
Navigate to Configuration Properties > Linker > Manifest File > UAC Execution Level and set to requireAdministrator (/level='requireAdministrator').
It took a lot to figure out this because all of the info on the web is for Visual Studio 2010 or earlier which required manually creating an XML manifest file and conflicts with the auto generated one that this creates.
However, this doesn't seem to be enough to get it to run as an admin. It is a real PITA that this information isn't made easily findable. Is there some other step that I am missing? Something like a signing process?
Turns out it is how this mini application is run.
From my main programme, using ShellExecute() or ShellExecuteEx() with the "runas" verb will allow running of this executable with administrator privileges without popping up a UAC dialog.
Running this from the command line however, will result in this mini app being executed in the user's security context, which is what I was doing.

Unable to update my App programmatically in Win8 - mfc

I am trying to update my App from the sysMenu.
And by doing click on Update App.. in the SysMenu, Updates automatically started.
Its working fine with XP and Win 7,
But when I trying to do the same thing in Win 8 then Its not working.
It gives alert message that "You do not have sufficient rights to run this App".
even if I am logged with Administrator user.
Hint: If I manually run that Updates.exe with run as Administrator then its also working.
I have attached the screen shot. I don't know why this happen with Win 8 only.
Edit
I have also refer these articles.
https://learn.microsoft.com/en-us/previous-versions/bb756929(v=msdn.10)
http://www.developerfusion.com/code/7987/making-a-net-app-run-on-vista-with-administrator-priviledges/
I am definitely sure that there is something wrong with your manifest file. Please embed the manifest with
<requestedExecutionLevel level="requireAdministrator" uiAccess="false">
with your Updates.exe.
Though even you have tried it, please try it one more time.
The error dialog seen in snapshot is look like its from your app. So there may be some check in your app, which is showing this dialog.
You didn't mention if this is your app or not. I assume it's your app, which you have build using the given manifest setting.
You can use Process Explorer to check if it is running with Elevated user permissions or not (check when this dialog comes up). It may be some build issue, you are setting this UAC setting for different project/build, and attempting to run different executable.
Other thing might be with specific user rights in Local Security Policy (I don't know which policy may allow/prevent updates). Or may be with the thread security rights, which is attempting to launch updates.

Error 500 in each xpage

I am facing a strange error in xpages. Whenever i preview any xpage in internet explorer I get error 500. I've tried this with new nsf, I created only one blank xpage with no elements and tried to preview, I got the same error.
I've also checked the "Display Xpages runtime error page" in xpages tab in Application Properties section but got the same 500 error.
(I am working on my local machine)
Url of my xpage:
http://localhost/test/testdb.nsf/testxpage.xsp
For every preview attempt log.nsf has below entry
04/17/2012 03:24:10 PM HTTP Web Server: Command Not Handled Exception [/test/testdb.nsf/testxpage.xsp] Anonymous
Below is the error on ie.
Error 500
HTTP Web Server: Command Not Handled Exception
Step 1: Go to the application properties and tick "Show standard error page"
Step 2: Make sure that your application is build (default autobuild in project is ON, but you never know)
Step 3: Try project clean
Step 4: Check the errorlog in data/domino/workspace/log
Step 5: Post your code here to have a look
Based on your description most probable reason is security: you have no right to run XPages on the server. Either sign with proper ID or manage to be in "Sign agents or XPages to run on behalf of the invoker:" field of server document (in Security tab).
Anyway, you should always look for the log mentioned by #Simon McLoughlin.
Try looking at the stack trace in C:/domino-Data-Directory/IBM_TECHNICAL_SUPPORT and the most recent xpages_...log file, generally a lot more helpful than the one line errors you get in other places
If you are working on Windows Vista/7 then for starting your Lotus Notes, right click on Lotus Notes icon and click on "Run as administrator". It works this way on my local machine. I guess this is due to UAC (User Account Control).
I guess that it is your Notes client. Then you need to check with your admin.
Some of the time, We do not have a sufficient privilege for data folder. I am also faced this issue.
Check your server port, probably it may 80. So some your application takes port 80 like face book, skype... So quit that process and try :)
Are you using Extension library in the application ?
Then you need to do a double installation, both the designer and the Client installation to be able to preview.
I'm experiencing the same issue with my server, I only did what #stwissel suggested and then restarted my server and it all worked, but in your case your running it locally try restarting you PC and hope it works.
Are you running Quicker? I found this article and thought it might help, http://www.zarazaga.net/web/z.nsf/dx/getting-error-500-on-opening-an-xpage

Windows XP Pro Service runs using User logon, not using Local System

I wrote a Windows Service using VS 2005 and C# on WinXP Pro SP3. It starts another program which runs to completion and then exits.
The service is installed using installutil and serviceInstaller. It is built release and put into the C:\Program Files\MyService directory. The serviceProcessInstaller Account is set to LocalSystem in it's Properties.
If I set the Log On to Local system I get an 'Access Denied' error (using a try-catch block), but if I set the Log On to my account with the correct password, it runs perfectly.
What am I doing wrong? Any suggestions will be very welcome.
It will be useful to know where the access denied error comes from. Since you say it is from a try/catch block, I assume it is your code that handles it. That would mean that your service is starting just fine, but has problems doing its job.
It could be environment related problem, since the environment for LocalSystem is different than your user account. Also, it could be that the program it starts is not executing properly and it is returning the error.
Without more info, it is just speculation. What is that other program doing? Where is the error occurring? Why don't you debug it and find which part returns the access denied error?
Agreed, it should be on SO. That aside, check your file/folder permission sand ensure System does in fact have the necessary rights. Do the same for the registry keys. The System event log should give you some clues.
Both answers: thanks for the help.
The error orrurs at the Process.Start() call.
The file and directory security shows Everyone has full access to the directories and the executable.
FOUND IT! I had added a user name and password to the ProcessStartInfo object, thinking that it would be useful when the target program tries to get to the database. Oops! When I took that stuff out, the target runs jult like it should.
Thanks again to all who replied. Mea Culpa!

Resources