Dave's Technophorical Times

A blog about Microsoft's Technologies!
SharePoint :: MVC :: ASP.NET :: IIS :: SQL Server :: Visual Studio :: MS Access

One of the basic things you would want to do with SharePoint Designer 2010 is editing the layout of the page. This seems easy enough, but when SharePoint Designer 2010 blocks access to the yellowish parts of the code it becomes quite impossible. This is for a good reason, and can be annoying at when you first use SharePoint Designer.

To get around this issue you need to click on the Advanced Mode Ribbon button. Then auto-magically it's accessible and you can get the job done! 

After the Advanced Button is clicked, the server does some processing and then it allows access, which is evident when the yellowish background is removed! 

Happy coding!



The "The stored procedure executed successfully but did not return records" message will usually display when using a Stored Proc that uses Temp tables that use SELECT * INTO #TempTable FROM dbo.Table. To get around this problem you MUST use SET NOCOUNT ON as show below.
AS
SET
NOCOUNT ON
Without that, either ADO or DAO will see the rowcount returned from the first select, and think the procedure has completed before a result is ready.



When using Authentication with a Web Application you might get Sys is undefined when starting up in Visual Studio using IE. This is an Authentication issue that is resolved by using this solution.

 

 

 <location path="Telerik.Web.UI.WebResource.axd">
 <system.web>
 <authorization>
 <allow users="*"/>
 </authorization>
 </system.web>
 </location>

 

Hope this helps someone out there!


A recent install resulted in the following error:

“Setup is unable to proceed due to the following error(s): A system restart from a previous installation is pending.”

 

The problem was related to a registry key “PendingFileRenameOperations” located at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager.

 

Fix

Rename the key to PendingFileRenameOperations1 and you will be able to proceed with the install.



Run "aspnet_regiis.exe" program from command line (within Command Prompt):

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe –i

If you want to open it using the Run program, just type in "Run" in the Windows 7 search box, then use the following line below in the Open box, then click OK:

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe –i

Note if your computer is 64 bit, then I would change the line to:

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe –i

Hopefully, these solutions help get you up and running and fix the IIS7 error... Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list.



PROBLEM.

Situation: using stsadm -o enumallwebs -includewebparts returns list of webpart. One of which I want to remove across the entire site.

Issue: Using the GUID I find the webpart Page Id, then look up the location and page name in the AllDocs table. So far all is good EXCEPT, the page is missing! It has been deleted.

How do I: get the Page back so that I can remove the WebPart? It will always remain in the stsadm -o enumallwebs -includewebparts results.

Migration to 2010: Will this be an issue when I migrate to SharePoint 2010, which is whay I am "cleaning up" the site in the first place.

SOLUTION.

So, the solution was to simply delete the offending rows in the AllDocs table. I was afraid of doing this in case something went wrong, so I did a backup first! Then researched the AllDocs table a bit more and found a blog were this was explained. Now all is well :-) Thanks to SPDoctor for taking the time to comment.



I came across a "File Not Found" error when attempting at access a SharePoint Page that had a custom Web Part. Not a very useful error message to say the least. So, in order to actually get more information you will need to have access to the Web.Config file.

Follow these steps:

  1. Navigate Here:
    "C:\inetpub\wwroot\wss\Virtual Directories\<your web app's virtual directory>"
    1. You can also open IIS
    2. Expand Sites.
    3. Right click on your SharePoint site
    4. Choose explore.
  2. Copy and paste the web.config file (making a backup)
  3. Open web.config using in your favourite editor.
  4. Search for “CallStack” , set this equal to true
  5. Search for “Custom”, set the customerrors = “Off”
  6. Search for “Debug”, set Debug = “True”
  7. Save the web.config file and refresh your page in the browser

 

You should now see the problem in the Call Stack and have enough information to know what the problem is or could be.

When you have fixed the problem you may need to so a iisreset to see the site again. Finally, you will need to revert all of those changes to the Web.Config file so that the user doesn't see "Too Much Info"!

Enjoy!
Dave



If you use Tortoise SVN and notice that the overlay icons are not showing then it probably due to the fact that you have not configured Tortoise SVN to use Network Drive. By deault, this is disabled. To switch it on goto Tortoise SVN Settings. Select Icon Overlays and check the Network drives box. Click ON and Refresh your Windows Explorer.

 

OR What this guy said http://www.sitepoint.com/missing-tortoisesvn-file-status-overlay-icons/

For many Windows-based developers, Subversion and TortoiseSVN is a great source control solution. It’s free, is regularly updated, works on most versions of Windows and integrates well within the OS. TortoiseSVN will be one of the first systems developers install after upgrading to Windows 7.

Tortoise normally shows an overlay icon on every version-controlled file to indicate whether it has been added to the SVN repository, is new, modified, etc. While it may not be absolutely essential, the overlay offers a quick view of the current project status.

Tortoise icon overlays

Unfortunately, Windows Tortoise users can encounter an issue where the file overlays disappear. It’s not an issue specific to Tortoise and it can affect any application which adds several icon overlays. The problem is caused by the number of overlays permitted in different versions of Windows. Vista 32-bit appears to support 15 overlay types, whereas Windows 7 64-bit supports 11. Installing a program which adds its own icon overlays can therefore disable them in another application.

Windows registers 3 icon overlays (this may differ between versions). Tortoise registers another 9. Dropbox registers 3 and will re-install them if they’re missing when the application is restarted. So Windows 7 64-bit users will only be able to view Tortoise icons if at least 4 (non-Dropbox) overlay types are removed from the system.

Here be dragons!
The fix I’m about to describe involves tampering with the Windows registry. It’s dangerous and one false move could trash your Windows installation!

If you’re willing to take the risk, fire up the Windows Registry Editor (regedit.exe) and navigate to: HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion Explorer ShellIconOverlayIdentifiers

Export the branch as a .reg file — this will allow you to restore the old settings should anything go wrong.

You will see the Tortoise and other icon overlay identifiers as sub-branches. You can delete unnecessary icon overlay types by right-clicking a branch and selecting Delete:

registry editing

Choosing which overlays are unnecessary is your decision and will depend on your requirements. There may be overlays for applications you do not use or have uninstalled. I removed the TortoiseLocked and TortoiseReadOnly types because I rarely use those SVN facilities. You could also delete the lesser-used Windows Offline Files and SharingPrivate.

Once you’re done, reboot Windows and check whether the Tortoise icon overlays have reappeared.

The version of Windows you’re running will determine how many branches you need to delete. If in doubt, remove one at a time, reboot and check.



I was recently given the task of copying a Web Application from one machine to another. It seemed like a simple task so I began by pulling a backup using stsadm, then thought I could simply do a restore into a web app that I had just created on the other box. It seemed simple enough but I ran into a version issue as shown here. One thing to note here is that I was going from 32-bit (Win 2003) to 64-bit (Win 2008 R2), however I don't think that really matters in this instance.

Interesting. So I went to Central Admin. Operations->Servers in Farm on the destination box and said it was version 12.0.0.6421. Not the version I need!

I then discovered this site, well my partner in crime, Rod, found it: http://sharepointingitout.blogspot.com/2008/12/sharepoint-2007-version-numbers.html

I proceeded to download KB2553022 which was the one I needed as I'm running WSS 3.0. Once you get to the download just click on the View and request hotfix download as shown here.

I had to fill in my e-mail address etc and then I got the link for the download. It took about 5 minutes to install. I then had to re-run SharePoint.exe to Repair my set-up as the install appeared to take offence to my SharePoint installation as I couldn't open CA or the web app after the install. After I did the Repair I then rebooted and ran the SharePoint Products and Technical Configuration Wizard after it came back up.

That was it, I then opened up CA again and now I have version 12.0.0.6565 and the restore WORKED!

Thanks
Dave

 



If you are working with SQL Stored Procedures and Functions, it's simple to add the db_owner role to your own login. However, when you want to release your database to a production environment you really want to take away the db_owner role as it has the ability to add, edit and remove database objects in a production environment. The proper way of assigning permissions is to give the user\group in question db_reader and db_writer privilages ONLY and remove the db_owner role. You then need to GRANT the user\group EXECUTE permission on all the Stored Procedures.

To do this you may need to run the following script in order to generate the script so this may be done quickly rather than applying the permission one by one. Once run, simply copy the results to a new window and Execute all lines.

DECLARE @User varchar(50)
SELECT @User = '[domain\userid]'

SELECT 'GRANT EXEC ON ' + name + ' TO ' + @User
FROM  dbo.sysobjects
WHERE type IN ('P', 'FN')
AND category = 0
ORDER BY name

OR if you want to GRANT to PUBLIC

DECLARE @User varchar(50)
SELECT @User = 'PUBLIC'

SELECT 'GRANT EXEC ON ' + name + ' TO ' + @User
FROM  dbo.sysobjects
WHERE type IN ('P', 'FN')
AND category = 0
ORDER BY name

This link had more details regarding the objects you might need to query.
http://msdn.microsoft.com/en-us/library/ms190324.aspx



The Blogger

Dave Stuart I'm a Developer with a passion for coding. I enjoy the challengers that come with the job! SharePoint is one of my expert areas along with .NET Web Development with MVC and good old MS Access VBA coding. I Blog so that I can remember how I did that way back when; PLUS all this stuff is searchable! I constantly study and run my own business, Dafran Inc. I have passed 22 Microsoft Exams since 1998 when I first jumped on the treadmill of knowledge. I hope that you enjoy this Blog as much as I enjoy updating it. All the very best from Calgary, Alberta, Canada. contact me at linkedin @ dafran.ca

Calendar

<<  June 2019  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Sign in