Wednesday, 15 July 2009

input Checkbox or Radio button with runat server and checked property

Usually, when we actually don’t need of ASP.NET controls, we will use HTML control with runat="sever" for better processing. So, if you use the input checkbox/radio button control, it has the checked attribute, by default it look for the value "checked" for checked attribute in HTML. But because we made it server-side control by adding runat="sever" to it, it won't allow the "checked" value to "checked" attribute. The possible values for it is only True or False.

<input type="radio" runat="server" id="radioTech" checked="true" />

So, instead of "checked" value, use true or false.

Blocked file types in SharePoint 2007 – Custom web services 2.0 in SharePoint 2007 – Part 3

Please read the post "Steps to implement custom web services in SharePoint" before continue here.

I think, most of the people don't know about blocked file types and where can we set them. SharePoint by default, won't allow all the file extensions because of some security issues.

Why the SharePoint team didn't allow them by default. There is a strong reason behind it. i.e. not other than Security reasons. For example, EXE extension file, script files etc.

How to remove a blocked file type?

  • Open central administration site.
  • Go to Operations tab.
  • Find a section named "Security Configuration".
  • Under this section, you can find a link for "Blocked file types".

    Blocked file types

  • On this page, you can see a text box area which displays all the file extensions one per line, which SharePoint blocked by default.

      image

  • You can edit and delete the extension. Then SharePoint allows user to upload the file or access the file.

So, if you are facing the problem of not able to upload the files of type .asmx, .exe, .chm etc.. This is the place where you set it. Happy SharePointing.

Custom web services in SharePoint 2007 - Web.config changes – Part 2

Please read the article "Steps to implement web service 2.0 in SharePoint" before continue this post. Then you will get some idea on what is the need of change in web.config for implementing custom web service 2.0 in SharePoint.

SharePoint framework don't allow to call web services from java script by default. For this, we explicitly tell the web application that when any request from javascript to web services then use this http handlers, http modules and allow *.asmx files to serve in SharePoint.

So, please follow the steps below.

Changes required in the sections.

  • HttpHandlers and httpModules in <System.Web> section.
  • Adding a new section named <System.WebServer>.
  • This is not needed, but useful if you have installed two versions of Ajax libraries[1.0 and 3.5] for System.Web.Extensions. Assembly binding redirect in <runtime>
  • Add  System.web.Extensions assembly to the <assemblies> section. This is very important.

Please add the sections as it is in the web.config file of your SharePoint web site to get the web services 2.0 work.

1. <httpHeaders> section:
    <remove verb="*" path="*.asmx"/>
    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers>

2. <httpModules> section:

    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

3. <System.WebServer> section:

<system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules>
            <remove name="ScriptModule"/>
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </modules>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory"/>
            <remove name="ScriptHandlerFactoryAppServices"/>
            <remove name="ScriptResource"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </handlers>
    </system.webServer>

4. <runtime> Section:

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
        </assemblyBinding>

5. <assemblies> section:

Add this entry to <assemblies> section.

<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

That’s it!!! With these changes it will allow you to access web services from java script. I spent my valuable time to find this way to solve so many problems. Do you like this?

Steps to add a Web service 2.0 in SharePoint 2007

Today at my work, I need to implement JQuery in SharePoint on a module. I need to make AJAX calls to get the data from the database depending on the value in a text box. So, I choose JQuery, because I know it well and it will take very less time to implement. But for JQuery I need to create page web methods. But SharePoint doesn’t support Page web methods because SharePoint is completely built upon ASP.NET 2.0.

So, what is the solution, how can I make a call to the server and get the data from DB? After thought some time about it, finally I got a brilliant and better idea of using web services. Please follow the steps below to implement Web services in SharePoint.

  • We are using client side technologies like JQuery etc to call Web service to get the data from server. By default, it is not supported. For that, we need the supporting DLL's[System.Web.Script.Services] for the Web service script on the SharePoint server. These DLL's are needed to process the web service request and send the response[JSON]. For those DLL, you need to install the Ajax extensions 1.0.
  • Create a web service using Visual studio. It will generate two files webservice.asmx and webservice.cs. Write all the web methods required inside the webservice.cs file. I will explain you with an example more detail later in this post.
  • Now, we need a location to keep our *.cs [webservice.cs] file. So, for that, create App_Code folder in the SharePoint site file system virtual directory root [c:\inetpub\…\wss\virtualdirectories\portnumber]. You can find the advantages of using App_code folder, in SharePoint web application in this post.
  • By default SharePoint won't allow the script handlers and http modules. For this reasons, we need to make the web.config changes as explained in this post.
  • Change the settings in central admin to remove asmx extension from blocked file types. See it here.

After you are ready with all the above steps, then please follow the steps below.

  • Check the related dll’s are added in the system, after installed Ajax extensions. Below are the namespaces you required in the webservice.cs file.
  • using System.Web.Services;
    using System.Web.Script.Services;

  • Copy the webservice.asmx file to the SharePoint website virtual directory file system path [c:\inetpub\…\wss\virtualdirectories\portnumber\].
  • Copy the file webservice.cs file, and paste it in the app_code folder of the SharePoint web site.
  • Please follow the post web.config changes as explained.
  • Central administration changes as explained above.

There we are done with the process. This is really working great and we can solve really very difficult problems like all scenarios where we need to communicate with DB without doing post back etc. This is very smooth and fast way of retrieving results. I like to hear feedback. This is the one of the best solutions I found. Please post any problems if you face while implementing this process.

Isn't this a valuable find?

Thursday, 9 July 2009

App_Code folder in SharePoint – Custom web services in SharePoint – Part 1

On the way of explaining the process of implementing custom web services in SharePoint, I thought of telling you the advantage of App_Code folder in SharePoint. So, Please read this post before continue here.

If you are a .NET developer then you know the advantage of App_Code folder. When I am new to SharePoint technology, I thought like we can't add App_Code folder in SharePoint root folder because i didn't find it in the virtual directory path. […/Inetpub/wwwroot/…../] But few days back, when I got time, I want to do experiment on the App_Code folder in SharePoint. So, what are the advantages and how to do it please follow below steps.

  • Go to SharePoint web site virtual directory file system path. There you can find web.config file, _app_bin, App_Browsers etc…
  • Create a folder named App_Code.
  • Copy a class file [.cs], which you want to use in SharePoint coding inside the App_Code folder.

Now, you can access this class any where in the SharePoint web site. Very useful one right?

Wow, This helped me many scenarios and really a good tactic for solving lot of problems. Try this now!!!

Wednesday, 8 July 2009

Fixing the error Permission denied to get property XULElement.selectedIndex in Mozilla Firefox

When working with Mozilla Firefox browser, I usually come across the error below many times.

Usual exception details: Permission denied to get property XULElement.selectedIndex

Error because of my own javascript function:
Permission denied to get property XULElement.popupOpen

I want to write this post because, for me it took long time to solve the issue. May be most of the people may get this error when working with Mozilla Firefox.

Why it is coming? What are the possibilities?

This will come if you are making AJAX calls with a input type text box, then firebug will throw this error. This is because it is a autocomplete functionality. To fix this what you need to do is, just add an attribute to input control as shown below.

<input type="text" autocomplete="off" />

This will stop Firefox from attempting to complete the content in the box.

That's it!!!

Is this helpful?

Microsoft.SharePoint.Upgrade.SPUpgradeException

After I installed the MOSS SP2 update yesterday, when I hit refresh on my custom ASPX page, I got the below exception.

Microsoft.SharePoint.Upgrade.SPUpgradeException: An error has occurred on the server.http://go.microsoft.com/fwlink?LinkID=96177.

I was little bit surprised and frustrated to find out the cause why it was showing. I ran the configuration wizard and checked the database schema version. Everything was fine. After research and thought about it for some time, started trail and error methods to find out the issue by going to event viewer and logs etc…

Finally found the problem. That was Because of not restarting the server after installing the SP2 on the server. After I restarted the server, everything worked fine and i am very happy by seeing the page on the browser.

Is this helpful?

Tuesday, 7 July 2009

Install language pack in SharePoint 2007

I have MOSS server running from long time and it has plenty of sites running. Now I got a new requirement from one of my clients that their site should support different languages. This bothered me somewhat because of this article. http://technet.microsoft.com/en-us/library/cc262108.aspx

Which explains as below

  • Install the necessary language files on the front-end Web servers.

  • Install Office SharePoint Server 2007 on each front-end Web server.

  • Run the SharePoint Products and Technologies Configuration Wizard on each front-end Web server.

If that is the case, I need to uninstall MOSS on the server and need to install all language files before installing MOSS. But if that happens I will loose my server settings and the whole environment. It’s impossible to get the same development settings if I uninstall it. Then I posted about this, in MSDN forums and Mike Walsh all time favorite to me, gave me very fast reply and his solution worked great!!!

You can take a look at it here.

http://social.msdn.microsoft.com/Forums/en-US/sharepointadmin/thread/1963f252-056e-43ec-8480-d99a4f8d5388

Hope this will help you too!!!

Show envelope icon in notification area – Outlook 2007

Today, I am little bit surprised that I didn’t see the envelope icon in notification area of my window Taskbar even i have unread emails in my Outlook inbox. So, as usual I thought, no new messages were in my inbox. After some time, my colleague came and asked me that why didn’t you give reply for the messages I sent. I told him that I didn’t get any. He was surprised and checked his sent items list and he was sure that mail was sent to me. Immediately I open my inbox and found couple of messages from him. That was a big shock and I didn’t believe that. Because I completely believe in the envelope symbol on the Taskbar that if any unread mail is in my inbox, it should show up there.

image

Some how the settings were changed and i started checking the tools options for getting that again. Below are the steps i followed to get it.

  • Open your Outlook.
  • Go to Tools menu, choose Options.
  • In the preference tab, you can find a section for E-mail as shown below.
  • image
  • Click on the E-mail Options button. Which will open a window for the email option.
  • Click on the Advanced E-main Options button which again opens another windows which has the option we want.
  • Select the option "Show envelope in notification area" as shown below.
  • image
  • That’s it. Now I am able to see the envelope icon in the notification area on new mail arrival.
  • image

Hope this helps for the people who faced the same problem.

Thursday, 2 July 2009

DOOM Resurrection Cheats

For iPhone jailbroken user, this will patch your current checkpoint to increase the shotgun shell to 1,000. For non-jailbreak iPhone you may check this out on how to unlock & jailbreak your iPhone 2G using Redsn0w.

You need to have the DOOM Resurrection installed and launched (start playing the game) once in the first place before install this package and have you checkpoint saved and have the shotgun before install this patch. Please RESUME your game after install this patch. Check out my post here to review and download this cracked .ipa file. Also you may read instruction on how to install cracked .ipa file for iPhone 2.x firmware. Please bear in mind, this package does not support iPhone OS 3.0 beta and/or Icy. This is for Cydia and for 2.x firmware only.

You have to "Add Sources" to you sources in repository for iPhone first in order to install DOOM Resurrection Patch. At "Add" sections you have to enter this address, http://iphone.org.hk/apt/..If you not clear about this you can check out my post on how to add sources via Cydia. If you already added this, ignore this repo and you can proceed to install this package.


Install DOOM Resurrection Patch Via Cydia

Launch Cydia > Select “Sections” at haptic menu > Select “Games” category > and select “DOOM Resurrection Patch” or you can tap “Search” in Cydia and type “DOOM Resurrection Patch” > Select “install” button at the right top and confirm it to install.

NOTE: As the game will reset the ammo to maximum 320 if you pick up shells during the game, you need to reinstall this package to refill you ammo in this case.

ROLANDO 2: Quest for the Golden Orchid

Category: Games
Price: $9.99

Size: 56.1 MB

Latest version: 1.1

Expand your tactics and take your adventure to new heights and depths with a variety of physics-based gameplay features like vehicles, buoyancy and flying Rolandos. Blast, zap, drown and skewer the islands most hostile inhabitants as you battle your way to victory using all-new combat features.

While online, compare your Awards and High Scores with others on ROLANDO 2's Global Leader Boards and challenge your friends to beat your score using OS 3.0's push notification. Requires internet connection.
Experience lush graphics in your epic quest through tropical beaches, ancient ruins, volcanic caverns and dark jungles. Visit rolando2.ngmoco.com for the latest news and media.


Compatible with iPhone and iPod touch and minimum requires iPhone OS 3.0 or later. You can purchase via direct iTunes link or download cracked .ipa file code:

http://www.appscene.org/download.php?id=165318127
http://www.appscene.org/download.php?id=263447716
http://www.2shared.com/file/6539585/9c251298/Rolando_2_RS.html

Updated: Download cracked .ipa file for 1.1 version:
http://ipauploader.com/download/6b33e3ae504b4a40708acd3a4a172625/ROLANDO+2+Quest+for+the+Golden+Orchid-1.1.ipa
http://getapp.info/download/rolando_2-v1.1-arce_game.ipa
http://www.appscene.org/download.php?id=291225942


Cricket ICC World Twenty 20 England 09

Category: Games
Price: $2.99

Size: 8.6 MB

Latest version: 0.1.21

Use intuitive and simple gestures to control over 9 different batting strokes or bowl your team to victory as a pace bowler or a spin wizard. With 12 teams, 9 shots, player selection and Free hit rule, this game got it all. The hottest game in cricket, play a Quick game, or take on the best in the World Twenty20 Tournament. All the bat-crashing excitement of smashing sixes and fours. Auto Shot Selection caters for easy play, while Manual Mode takes difficulty to another level.

Compatible with iPhone and iPod touch and minimum requires is iPhone OS 2.2.1 or later.
You can purchase via direct iTunes link or download cracked .ipa file code:

http://www.appscene.org/download.php?id=465958296
http://getapp.info/download/CRICKET_ICC_ENGLAND_09_0.1.2.1-Hexhammer.ipa
http://www.badongo.com/pt/file/15774469


ISP Usage: Track Your Data Internet Connection

Category: Utilities
Price: $1.99

Size: 0.4 MB

Latest version: 1.2.0

This application lets you keep an eye on how much of your monthly usage quota you have used on your home internet connection. Account login details are required to fetch the usage information. Visit at http://lemonjar.com/blog/ for more information.

Support these Australian Internet Service Providers:
● aaNet
● Telstra BigPond
● Exetel
● Internode
● Optusnet
● TPG Internet
● Westnet


Compatible with iPhone and iPod touch and minimum requires is iPhone OS 2.2.1 or later. You can purchase via direct iTunes link or download cracked .ipa file code:

http://www.appscene.org/download.php?id=422293226
http://getapp.info/download/ISP_Usage-v1.2.0-Chappo.ipa


Dev Team Warn Not To Jailbreak For iPhone OS 3.1

Apple released the 3.1 beta firmware and SDK to developers, which is seems to include a few new features. Read here for new features of iPhone OS 3.1. The biggest change is the update of the baseband to 5.08.01. If you don’t care about jailbreaking or unlocking your iPhone, then this doesn’t matter to you. However, if you want to keep you device jailbroken/unlocked, you should not update to 3.1 beta, or even the official 3.1 firmware when it’s released to the general public.

Dev Team warned us, updating to 3.1 will prevent you from running any jailbreak method, which would make it impossible to unlock. So we wait and see what happen!

Ultrasn0w users must stay away from any firmware updates past 3.0 (including today’s 3.1 beta) until we release the tools that let you update the firmware without updating the baseband. For most phones out there, baseband updates are irreversible and you’ll lose ultrasn0w.

This warning does not apply to the iPhone 2G, which uses BootNeuter for the unlock, not ultrasn0w.


New Features Of Facebook For iPhone OS 3.0

According to developer Joe Hewitt, the new version of facebook has come with 15 major improvements very soon. The update is about 98% done and upon completion will be submitted to Apple for approval.


Here is the new features:

1. The "new" News Feed
2. Like
3. Events (including the ability to RSVP)
4. Notes
5. Pages
6. Create new photo albums
7. Upload photos to any album
8. Zoom into photos
9. Easier photo tagging
10. Profile Pictures albums
11. A new home screen for easy access to all your stuff, search, and notifications
12. Add your favorite profiles and pages to the home screen
13. Better Notifications (they link to the comments so you can reply)
14. Quickly call or text people right from the Friends page
15. Messages you are typing will be restored if you quit or are interrupted by a phone call


Read here for more info about the facebook.

Wednesday, 1 July 2009

New Features For iPhone 3.1 OS


Some iPhone developers have downloaded the beta firmware and found out the new features come with this update:



  1. (For iPhone 3GS only) Now Video Editing gives you the option to trim your clip then “Save as copy…” rather then replacing the original video clip.
  2. (For iPhone 3GS only) Voice Control works over Bluetooth.
  3. iPhone now vibrates when arranging icons.
  4. Updated AT&T profile to 4.2
  5. The baseband version is updated to 5.08.01. This will fix the holes used by ultrasn0w and makes ultrasn0w fail to unlock iPhone 3G. So, don’t upgrade to iPhone 3.1 beta if you need to unlock iPhone 3G
  6. OpenGL and Quartz got improved. (For Developer)
  7. APIs to allow third party apps to access videos and edit them. (For Developer)

Xtreme Quad Racing

Category: Games
Price: $3.99

Size: 14.6 MB

Latest version: 1.1

Realistic quad racing simulator,'Xtreme Quad Racing' is the ultimate offroad quad racing experience for the iPhone. In 'Xtreme Quad Racing' you have to race through 5 different tracks and beat the computer racers in order to complete the game.


Features:
- 3D spatial sound
- Quick race mode allows you to try the 5 tracks separately
- 3 difficulty levels
5 Fully 3D racing circuits
- 4 different quads
- Third view and first view camera modes

Compatible with iPhone and iPod touch and minimum requires is iPhone OS 2.0 or later. You can purchase via direct iTunes link or download cracked .ipa file code:

http://www.appscene.org/download.php?id=999561936
http://ipauploader.com/download/bfe61f66cf545699c37b713205e3dfa7/Xtreme+Quad+Racing-1.1.ipa
http://www.2shared.com/file/6516642/8e113558/Xtreme_Quad_Racing_v11.html



iPhone 3.1 Beta Has Released To Developers


Today, Apple releases iPhone OS 3.1 Beta to developers:

iPhone SDK 3.1 beta and iPhone OS 3.1 beta are now posted to the iPhone Dev Center. These versions are for development and testing only and should be installed on devices dedicated to iPhone OS 3.1 beta software development. Please read the iPhone OS Pre-Install Advisory and the iPhone SDK 3.1 beta release notes before downloading and installing.

Now, the iPhone 3.1 release is still in beta and only available to developers. Apple does not provide any details about the update. But it’s quite sure Apple will fix the exploit that is currently used by ultrasn0w.

So, if you have already unlocked your iPhone 3G with ultrasn0w, please stay away from upgrading to iPhone 3.1.