Matt Williamson have suggest two solutions which both work fine
Solution 1.
1: using System;
2: using System.Collections.Generic;
3: using System.Linq;
4: using System.Web;
5: namespace MyProject.WebSite
6: {
7: public class PageBase : System.Web.UI.Page
8: {
9: protected void Page_PreInit(object sender, EventArgs e)
10: {
11: // This is necessary because Safari and Chrome browsers don't display the Menu control correctly.
12: // All webpages displaying an ASP.NET menu control must inherit this class.
13: if (Request.ServerVariables["http_user_agent"].IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) != -1)
14: Page.ClientTarget = "uplevel";
15: }
16: }
17: }
Then make sure all of your pages get inherit from this PageBase.
Solution 2.
1: if (Request.UserAgent.Contains("AppleWebKit")) Request.Browser.Adapters.Clear();
I'm remember that some one have done a smart declarative browser adapting solution which we can control ASP.NET Render to render fine-tuned HTML code for selected Browser in Web.config, but now can't find it back. Please lets me know if you find it around.
Matt Williamson have suggest two solutions which both work fine
Solution 1.
1: using System;
2: using System.Collections.Generic;
3: using System.Linq;
4: using System.Web;
5: namespace MyProject.WebSite
6: {
7: public class PageBase : System.Web.UI.Page
8: {
9: protected void Page_PreInit(object sender, EventArgs e)
10: {
11: // This is necessary because Safari and Chrome browsers don't display the Menu control correctly.
12: // All webpages displaying an ASP.NET menu control must inherit this class.
13: if (Request.ServerVariables["http_user_agent"].IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) != -1)
14: Page.ClientTarget = "uplevel";
15: }
16: }
17: }
Then make sure all of your pages get inherit from this PageBase.
Solution 2.
1: if (Request.UserAgent.Contains("AppleWebKit")) Request.Browser.Adapters.Clear();
I'm remember that some one have done a smart declarative browser adapting solution which we can control ASP.NET Render to render fine-tuned HTML code for selected Browser in Web.config, but now can't find it back. Please lets me know if you find it around.
Problems
Compile a Class Library project, you received this error
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1993,9): error MSB3091: Task failed because "al.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "al.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5. 2) Install Visual Studio 2008. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task. |
Or
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1993,9): error MSB3091: Task failed because "sgen.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "sgen.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5. 2) Install Visual Studio 2008. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task. |
Solutions
- Copy & paste following to NotePad:
| Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A] "InstallationFolder"="C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\" |
- Then rename the file extention to vsfix.reg.
- Double-click the file you just created then choose "Yes".
- You're done. :)
Some more links I have just know
- http://dukelupus.wordpress.com/2008/02/05/task-failed-because-sgenexe-was-not-found-solution/
- http://wiki.evident.nl/Default.aspx?Page=Task%20failed%20because%20sgen.exe%20was%20not%20found&AspxAutoDetectCookieSupport=1
AOL Instant Messenger (AIM)
AOL Instant Messenger (AIM) ids can be represented using the aim: protocol. Many who publish their AIM ids do so with clickable URLs e.g.:
<a href="aim:goim?screenname=ShoppingBuddy">IM with the AIM ShoppingBuddy</a>
Yahoo Messenger
Similarly, Yahoo Instant Messenger (YIM) ids can be represented using the ymsgr: protocol. And similarly many publish their YIM ids as clickable URLs e.g.:
<a href="ymsgr:sendIM?SomeYahooFriend">IM with SomeYahooFriend</a>
MSN Messenger
MSN Messenger (MSNIM) ids can be represented using the msnim: protocol. And similarly many publish their MSNIM ids as clickable URLs e.g.:
<a href="msnim:chat?contact=joebob@hotmail.com">IM with joebob@hotmail.com</a>
XMPP (Jabber)
Extensible Messaging and Presence Protocol (XMPP) (http://www.xmpp.org/) ids can be represented using the xmpp: protocol, e.g.:
<a class="url" href="xmpp:username@jabberservice.com">IM with username@jammerservice.com</a>
Skype
Skype can be represented using the skype: protocol. It can be used to open a chat session or make a Skype call.
<a href="skype:echo-chinese?chat">IM with the Skype echo service (Chinese) </a>
<a href="skype:echo-chinese?call">Skype call to Skype echo service (Chinese) </a>
ICQ
ICQ does not have a URL scheme. Rather ICQ links on the web use HTTP hyperlinks to download a resource of content-type application/x-icq which then the operating system opens with the user's ICQ client.
Thus we can markup those HTTP hyperlinks with the content-type set explicitly to communicate the ICQ semantic:
<a class="url"
type="application/x-icq"
href="http://www.icq.com/people/cmd.php?uin=[ICQNUMBER]&action=message">
Contact with ICQ</a>
Replacing [ICQNUMBER] with the user's actual ICQ number.
When you share a Folder from a Windows XP machine, you might not able to access to it even you see that computer in it's work group, any time you attempt to access to, you receive a error message like
- \\[SHARE] is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.
- Logon failure: the user has not been granted the requested logon type at this computer
When ran into it, you can consider one of two solution I found from others over Internet. It might help a lot.
Audit Local Security Settings
- On Start Menu>Control Panel>Users, enable Guest user.
- Open Local Security Settings by select Start Menu>Control Panel>Administrative Tools>Local Security Settings
- Navigate to Local Policies>User Rights Assignment
- Right-click on Access this computer from the network>Properties>Add Users or Groups, add everyone or any users you want to be able to access the computer from the network > Add Guest user to this if not exists
- Right-click on Deny access to this computer from the network>Properties, remove everyone or any users you do NOT want denied to be able to access the computer from the network > Remove Guest user from this if exists
Using Windows Server 2003 Resource Kit Tools (Steve Winograd)
- Download and install the Windows 2003 Server Resource Kit Tools
from http://go.microsoft.com/fwlink/?LinkId=4544 . - Click Start | All Programs | Windows Resource Kit Tools | Command Shell.
- Type these lines at the command prompt. The second and third commands are case-sensitive, so type them exactly as shown. Note the "+r" in the second one and the "-r" in the third one:
- net user guest /active:yes
- ntrights +r SeNetworkLogonRight -u Guest
- ntrights -r SeDenyNetworkLogonRight -u Guest
You'll not see "Shutdown" in Start Menu anymore when you are connected to a workstation via Remote Desktop, the "Shutdown" option changes to "Disconnect". If you want to turn off the computer, hibernate it, or put it on stand-by, there are really more than one solution to get thing done
- Open Task Manager, from the main Menu and select your shutdown option under "Shutdown" menu.
- On the desktop and type Alt+F4. This will call up the shutdown dialog.
- And the last way I know is using shutdown utilities from Star->Run command, here are some samples
- "shutdown" to shutdown
- "shutdown -r" to reboot
- "shutdown -i" to get a GUI
- "shutdown -l" to logoff
Off course that all need administrative privileges on the remote computer, you might supply your administrator account by %windir%\system32\runas.exe /user:AdminAcctNameHere "%windir%\system32\shutdown.exe -s "
One of our ASP.NET web application goes to production for months. Last week, we received reports on a few computers , users can't log-in with their correct credentials. We asked them to have administrator control on a computer which problem happen. After make sure that their Browser security, Anti-spyware, Anti-Virus and anything might cause the problem. We have decided install a HTTP traffic monitor tool like IE Web Developer V2 to see what happening on this computer with our website
- The browser requests the specified login.aspx page
- The server responds with the login page
- The user fills in the login page and submits the form, so the browser POST the form back to the login page
- If the credentials are valid, the server responds with another "302 Page Moved" status, a Location header pointing to a protected.aspx, and a Set-Cookie header providing the encrypted Forms Authentication Ticket. Everything seem as it happen on working computer.
- Get redirected to login.aspx page again
Nothing potential caused the problems and we did frustrated after 5 days without able to location is that wrong in client side or server side after
- Replace authentication module by new one
- Setup brand new application to a sandbox
- Review Web server configurations
- And anything we can think to....
Really headache, huh ?
God bless us, when we almost ran out of time and received more bad report from our users, we found why. I'm glad to share you our report on this problems, due to rights have been removed
Introduction
- When user provide correct username/password, Concorde will send them a authentication cookie with Issued date and Expired Date, these date are in GMT time zone.
- In our application, the authentication cookies will be expired in next 30’, as described in timeout attribute of <Forms…> tag of Web.config.
- This cookies is very important in order to authenticate visitor in HTTP stateless environment
Problems
- User can’t login occasionally in few computers, reported seem to be Internet Explorer 6 problems, FireFox and IE 7 are seem to be fine.
- We have re-write code to replace authentication by another alternative methods, but not work.
- Tracing Raw HTTP with some HTTP traffic monitoring tools show that
o Login code work well
o Authentication cookie issued but Internet Explorer seem rejected it without a reason (surely Its not blocked by security policy), cookies appeared and lost ==> YES, this is problem.
- We have check to make sure nothing straight happen to
o Browser, Browser’s security and privacy setting
o Client’s antivirus, firewall, anti-spyware,…
o Evaluating setting of websites, domains, sub-domains, and whole IIS setting, still see nothing.
o Online community doesn’t help at all.
Root cause
- Hopelessly, but how about cookie’s expired time ?
- Follow that idea and found there are something wrong to Cookie expired date, We didn’t really that because the value are in GMT, when client machine are in GMT-7. Convert current time in Server Machine, Client Machine to GMT, It’s clearly that Expired Date of the cookie are in past, and of course that IE will rejected it because it was expired.
- That mean there are something wrong with clocks on Server or Client machine here, but if this bug is occasionally happen, then this client’s clock must be the one wrong, I check out and see that this machine doesn’t auto-syn with Internet time server, that’s is.
- Also noticed that might be this is Daylight-saving problem and found a useful paper at http://support.microsoft.com/kb/934413
Solution
- Change timeout value of authentication cookie from 30 minutes to 120 minutes by change timeout="120" <forms name="XYZAuthentication" protection="All" path="/" loginUrl="~/Login.aspx" slidingExpiration="true" timeout="120" cookieless="UseCookies"/> in Web.config.
- Noticed that will not sure when clock on client machine faster than server machine above 2 hours (120 minutes), then ask end-users to
o Automatically synchronize with an Internet time server as attached screenshot
o Follow Microsoft’s Daylight Saving Time Help at http://support.microsoft.com/dst2007