Monday, 28 January 2013

Skype Audio Issue when headphones are plugged Inn

Problem

Most of the guys with laptop now a days facing a common problem that when headphones are plugged inn and any notification of skype popup either of message / IM or any call alert, it switches on audio device to spearker.

Solution

1. In you skype window, click Tools > Options..

2. In the popup winodw, select "Audio" from left pane, 
3. Select "Use selected Speaker" for Rining menu.
4. Uncheck "Automatically adjust speaker settings" .
5. Click "Show advance options".
6. Save and check again. If it is fixed then you are done, else move to point 7.
7. In the advance option window, look for "Speaker" section, a list will be there of all the devices of output. One device will be selected as default, which will be marked with green sign.
8. Select other than the default device and click "Move Up". It will mark the selected device as default and will mark with green sign.
9. Click "Save" and check agian. It must be fixed.

Hope that help!!

Monday, 14 January 2013

HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI filter "C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll" failed

Problem

I recently faced a problem in IIS 7, that when I was browsing any of the site hosted in my IIS, it was showing me an error message :

HTTP Error 500.0 - Internal Server Error

Calling LoadLibraryEx on ISAPI filter "C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll" failed

I tried several hit and tries like, I changed my application pool, removed my virtual directory and created new. But nothing worked for me.

Solution

Then I did some googling and found a post at :
http://forums.iis.net/t/1183736.aspx of kphani_prasad
Although it was not marked as answer but it solved my problem. 
Steps which solved my problem :
1. Go to IIS.
2. Select your application from left pane, and click "ISAP Filters" from the right pane.

3. Check the path for which IIS is raising error. As in my case it was "v4.0.30319", and when I checked the path it was having an extra "\" (slash) in the path, so it was not able to load the desired dll file. I edited the path and removed extra "\" from the Executable path. 
4. Restarted my IIS application and all was good to go.

Hope this help! 

Friday, 28 December 2012

SharePoint - Cannot peform this operation. The file is no longer checked our or has been deleted

Problem:

Recently I faced a problem, that in SharePoint Designer (2010), one of my file I checked out and then I checked Inn. Again when I opened my SharePoint site in Designer, it was showing the same file as checked inn. So I thought I might have forgot to check Inn. I again tried to check Inn, but it promt me an error message : 
               " Cannot peform this operation. The file is no longer checked our or has been deleted  "

Solution:

It is because of the cache being mantained with respect to user websites and application data.
What you have to do is, go to following locations :
  • %APPDATA%\Microsoft\Web Server Extensions\Cache
  • %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache
And clear all the content inside both folders. and try again, you are done!!

Hope this help!!

Saturday, 22 December 2012

The Report Server "http://localhost//ReportServer" is invalid

Problem:

Recently I faced a problem while installing with ReportingInstaller for Microsfot Commerece Server 2009 R2,  parameters like data warehouse server and Report Server url were correct but when I clicked "Test Connection" I got error message that :

"The Reporting Server "http://localhost/ReportServer" is invalid."

Solution: 

I googled for it, but didn't find any solution. What I did , I tested the url I was trying to hit in browser, then it returned me error that :

 "The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing"

Then I googled for it and found that we have to add user in the ReportServer configuration, and by following command you can add user :

rsconfig -c -s < SQLSERVERNAME > -d reportserver -a Windows -u < MYDOMAIN\MYACCOUNT > -p < PASSWORD >orrsconfig -c -m < REMOTECOMPUTERNAME > -s < SQLSERVERNAME > -d reportserver -a SQL -u SA -p < SAPASSWORD >
It worked for me nicely!!

Hope it help someone else..!! :-)


Friday, 7 December 2012

Javascript or Css disappears in Content Editor Webpart - CEWP

Problem:

Recenlty I faced a problem that I was writing some html along with javascript tag with some code in the CONTENT EDITOR WEBPART (CEWP). As soon as I save the page, all the tags of javascript disppeared or removed from CEWP. I googled, but did not find any solution.

Solution:

What I did, encapsulated the script and html within "CDATA" section, actually sharepoint 2010, it was removing all such script tags from the CEWP becasuse of secrutiy purpose, it removes all the script which could threaten or inject. Thus CDATA solved my problem.

Updated (Feb 18 2013) :
On my friend's request FAZ, am including an example to explain it littile bit more on this topic.

Sometimes you edit a page in sharepoint designer, and add javascript snippet in the page, on saving the page it prompt you a message that "unsafe code will removed...", and when the page is saved you will notice that the javascript snippet you just added is removed.
For Example:
1. Edit a page and add some javascript code snippet in the Content Editor Webpart and save.
 (Content Editor webpart is inserted using "Insert" tab in the SharePoint Designer, and then "Webpart" menu, and then select "Content Editor")
2. When you will save , it will prompt a message just shown in the figure below:

3. When you will click "Yes", you will notice that the javascript snipped you just added have been removed from the page.
So for that we have to keep our javsacirpt / CSS snippet in CDATA wrapping as shown below:


<script type="text/javascript"><![CDATA[
function Test()
{
alert("tested!");
}
]] </script>

Then it will not remove your snipped from the page.

Hope this help!!

Thursday, 6 December 2012

Captcha not working when hosted in IIS

Problem:

Recently I faced a problem that captcha was working when I browse my page which contains Captcha , was working fine, but when I hosted site in IIS , captcha image was not appearing instead it was showing just cross mark when I browse page in IE.

Solution:

Finally I found its solution. If you check the path of captcha image by right click, take properties of the image which is appearing as red cross mark, it will show you what its actually trying to hit or show, in my case it was an aspx patch with name CaptchaImage.aspx?id={xxxxx}, something like this.

So what I did, in IIS, 
1. selected my application, and
2. then chose "Handler Mappings", 
3. then clicked "Add Managed Handler" under "Action",

4. Request Path : Type the target url path of your captcha, as in my case mentioned above as page CaptchaImage.aspx,
in some cases it could be with different extension like CaptchaImage.axd, to confirm this, check your web.config , you will find this path in the tag you added for captch to work.
5. Type :  choose your dll or assembly from dropdown, if it is  not appearing , then you will have to add that assembly or dll as reference in your application or project from VS.
6. Name:  Type  any name for the hanlder, like CaptchaHandlerMapping . and click OK.




Now again browse page having captcha , it must work!!.
Hope this help.


Sunday, 2 December 2012

System.Security.SecurityException was unhandled by user code - InfoPath 2010

Problem:

Sometimes working with InfoPath , in my case its InfoPath - 2010, come across a problem of security exception mentioned below :

System.Security.SecurityException was unhandled by user code
Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=xxxxxx' failed

This exception arises when we are using some code snippet to communicate with SharePoint in any way. 

Plus would like to mention that when we use any "Manage Data Connection" , and preview our InfoPath form, it usually prompt a message :




Solution:

To solve this problem, you have to switch your InfoPath - 2010 form to Full Trust.
To do that, click "File" , then from menu choose "Info" and then "Form Options", and then uncheck "Automatically determine security level", by default its checked, and it will enable 3 radio buttons below this.
You have to choose "full trust", click OK. 

Now both the above mentioned warnings and exception should not occur.


Test Email without sending Email to User - C# / C-Sharp - DotNet

Sometimes we may want to test email functionality without sending email to actual user. Email will be saved locally so that we can verify ...