<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
	<channel>
		<title>Larmib.com - Blog</title>
		<link>http://blog.larmib.com/index.php</link>
		<description><![CDATA[Copyright 2010 - www.larmib.com<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-2809014-11");
pageTracker._trackPageview();
} catch(err) {}</script>]]></description>
		<copyright>Copyright 2010, Larry Johnson</copyright>
		<managingEditor>Larry Johnson</managingEditor>
		<language>en-US</language>
		<generator>SPHPBLOG 0.5.1</generator>
		<item>
			<title>IIS7 SSL works once but then stops.</title>
			<link>http://blog.larmib.com/index.php?entry=entry100331-215815</link>
			<description><![CDATA[<h3>Problem:</h3><br /><code>You installed an SSL Certificate and went to <a href="HTTPS://www.domain.com" target="_blank" >HTTPS://www.domain.com</a> it would work the first time, but then if you close your browser, and go back to <a href="HTTPS://www.domain.com" target="_blank" >HTTPS://www.domain.com</a> it stops working</code><br /><br />If you have already done some research on the issue or if you notice in your event viewer logs the event id 15300, 15301 like the one below then you can fix this error by using the resolution I used:<br /><br /><code><br />The description for Event ID ( 15301 ) in Source ( HTTP ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: \Device\Http\ReqQueue, 0.0.0.0:443.<br /></code><br /><br /><h3>Resolution:</h3><br /><br />What I did to fix this was to setup IP based rules. Example is say your server&#039;s IP is 192.168.0.100 and the port is 8520 then you would add the SSL Cert using the netsh command.<br /><br />If you don&#039;t know what your cert hash is you can open your certificates manager and view your SSL certificate.<br /><br />I&#039;ll provide more instructions later when I have time to write out better instructions ;-)]]></description>
			<category>Servers</category>
			<guid isPermaLink="true">http://blog.larmib.com/index.php?entry=entry100331-215815</guid>
			<author>Larry Johnson</author>
			<pubDate>Wed, 31 Mar 2010 16:58:15 GMT</pubDate>
			<comments>http://blog.larmib.com/comments.php?y=10&amp;m=03&amp;entry=entry100331-215815</comments>
		</item>
		<item>
			<title>Classic ASP and Facebook Connect</title>
			<link>http://blog.larmib.com/index.php?entry=entry100327-030950</link>
			<description><![CDATA[I wrote a simple Classic ASP game called Never Ending Maze back in 1998. It was in fact the first thing I wrote in ASP (VBScript) and how I learned how to program in VBScript. Anyhow in order to get facebook to interface with it I simply used the &quot;Connect&quot; button. Here&#039;s how the HTML code looks:<br /><br /><script type="text/javascript"><!--
google_ad_client = "pub-5387437216442455";
/* 468x60, created 4/28/10 larmib-blog */
google_ad_slot = "1273006875";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br /><br /><h3>login.asp</h3><br /><code><br />&lt;a href=&quot;http://www.facebook.com/login.php?v=1.0&amp;api_key=APIKEY&amp;next=http://www.neverendingmaze.com/fb_connect.asp&quot;&gt;&lt;img id=&quot;fb_login_image&quot; src=&quot;images/Connect_with_facebook_iphone.png&quot; alt=&quot;Connect&quot;/&gt;&lt;/a&gt;<br /></code><br /><br />After that hard bit of code was done, I wrote the simple fb_connect.asp page. This page handles the request, and communicates back to facebook to get the cookie. Once it has the cookie it will automatically redirect you to the /login.asp page. If it doesn&#039;t get the cookie, then it will refresh the page until it finally does. Do note that if you disable third party cookies this may not work:<br /><br /><h3>fb_connect.asp</h3><br /><code><br />&lt;%<br />Dim fb_uid,ApiKey<br />fb_uid = &quot;&quot;<br />ApiKey = &quot;183f81e6ef8024631ed9c91feb9e0d84&quot;<br />fb_uid = Request.Cookies(ApiKey &amp; &quot;_user&quot;)<br />Session(&quot;fb_uid&quot;) = fb_uid<br />If IsNumeric(fb_uid) And Len(fb_uid) &gt; 2 AND Len(Request.Cookies(ApiKey &amp; &quot;_session_key&quot;))&gt;2 Then<br />Response.Redirect &quot;/login.asp&quot;<br />End If<br />%&gt;<br />&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:fb=&quot;http://www.facebook.com/2008/fbml&quot;&gt;<br />&lt;head runat=&quot;server&quot;&gt;<br />&lt;title&gt;Never Ending Maze - Loading Facebook Connect...&lt;/title&gt;<br />&lt;script&gt;<br />function refresh()<br />{<br />window.location.reload();<br />}<br />setTimeout(&quot;refresh()&quot;,1700);<br />&lt;/script&gt;<br />&lt;meta http-equiv=&quot;refresh&quot; content=&quot;2&quot;&gt;<br />&lt;/head&gt;<br />&lt;body style=&quot;background-color:#000000;&quot;&gt;<br />&lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;<br />&lt;div&gt;<br />&lt;script src=&quot;http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />FB.init(&quot;183f81e6ef8024631ed9c91feb9e0d84&quot;, &quot;xd_receiver.htm&quot;);<br />&lt;/script&gt;<br />loading ...<br />&lt;/div&gt;<br />&lt;/form&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;<br /></code><br /><br />It&#039;s as easy as that to make a classic ASP page work with Facebook&#039;s Connect.]]></description>
			<category>Scripts</category>
			<guid isPermaLink="true">http://blog.larmib.com/index.php?entry=entry100327-030950</guid>
			<author>Larry Johnson</author>
			<pubDate>Fri, 26 Mar 2010 22:09:50 GMT</pubDate>
			<comments>http://blog.larmib.com/comments.php?y=10&amp;m=03&amp;entry=entry100327-030950</comments>
		</item>
		<item>
			<title>Setting up PPTP VPN on Debian for your iPhone</title>
			<link>http://blog.larmib.com/index.php?entry=entry100324-083401</link>
			<description><![CDATA[Debian setup is as simple as the following lines:<br /><br /><b>Install poptop</b><br /><br /># aptitude install pptp<br /><br /><b>Edit pptpd config files</b><br /><br />/etc/pptpd.conf<br /><br />The file should look like this:<br /><br />option /etc/ppp/pptpd-options<br />logwtmp<br />localip 192.168.0.1<br />remoteip 192.168.0.10-20<br /><br /><br />Set them to whatever private (or public) ip addressing you want. You could use IP addresses currently available in your network, if you do this you will not need to add the iptables rules for natting later in this guide.<br /><br />Your /etc/ppp/pptpd-options should look like this:<br /><br />Option 1<br />Set ms-wins and ms-dns to the name server the server you are currently working on is using (look in reolv.conf).<br /><br />Option 2<br />Or as I did install dnsmasq on the server and run it as a chaching dns server<br /><br /># aptitude install dnsmasq<br /><br />And then set ms-dns and ms-wins to 192.168.0.1 (or the localip you set)<br /><br />/etc/ppp/chap-secrets<br /><br />Setup users and passwords to connect the pptp server<br /><br />username	 pptpd	 somepassword	 *<br /><br />Turn on IP Forwarding<br /><br /># echo 1 &gt; /proc/sys/net/ipv4/ip_forward<br /><br />Set the change permanantly in /etc/sysctl.conf by uncommenting the line:<br /><br />net.ipv4.ip_forward=1<br /><br />Turn on NATing<br /><br />If you have created a new private network for your pptpd server, you probably have, you need to add a rule to iptables.<br /><br /># iptables --table nat --append POSTROUTING \<br />--out-interface eth0 --jump MASQUERADE<br /><br />But this rule needs be persistant so we need to create a script to run when the interface starts up<br /><br /># iptables-save &gt; /etc/iptables.conf<br /><br />Create a new file: /etc/network/if-up.d/iptables and paste in the following<br /><br />#!/bin/sh<br />/sbin/iptables-restore &lt; /etc/iptables.conf<br /><br />Set it to executable<br /># chmod 755 /etc/network/if-up.d/iptables<br /><br />All Done!. Just startup pptpd<br /><br /># /etc/init.d/pptpd start<br /><br /><br />On your iPhone use the following picture as a guide:<br /><img src="images/iphone_pptp.png" width="320" height="480" border="0" alt="" />]]></description>
			<category>Servers</category>
			<guid isPermaLink="true">http://blog.larmib.com/index.php?entry=entry100324-083401</guid>
			<author>Larry Johnson</author>
			<pubDate>Wed, 24 Mar 2010 03:34:01 GMT</pubDate>
			<comments>http://blog.larmib.com/comments.php?y=10&amp;m=03&amp;entry=entry100324-083401</comments>
		</item>
		<item>
			<title>Enable Password Never Expires in Active Directory</title>
			<link>http://blog.larmib.com/index.php?entry=entry100322-215935</link>
			<description><![CDATA[Here&#039;s a very simple script I wrote in VBScript to reset this flag if it doesn&#039;t exist for all users in any given OU.<br /><br /><code><br />Const ADS_UF_DONT_EXPIRE_PASSWD = &amp;H10000<br />Set objContainer = GetObject(&quot;LDAP://cn=Users,dc=domain,dc=local&quot;)<br />objContainer.Filter = Array(&quot;user&quot;)<br />For Each objUser In objContainer<br /> lngFlag = objUser.Get(&quot;userAccountControl&quot;)<br /> If (lngFlag And ADS_UF_DONT_EXPIRE_PASSWD)=0  Then<br />  lngFlag = lngFlag Xor ADS_UF_DONT_EXPIRE_PASSWD<br />  objUser.Put &quot;userAccountControl&quot;, lngFlag<br />  objUser.SetInfo<br />  wScript.echo objUser.Name<br /> End If<br />Next<br /></code>]]></description>
			<category>Scripts</category>
			<guid isPermaLink="true">http://blog.larmib.com/index.php?entry=entry100322-215935</guid>
			<author>Larry Johnson</author>
			<pubDate>Mon, 22 Mar 2010 16:59:35 GMT</pubDate>
			<comments>http://blog.larmib.com/comments.php?y=10&amp;m=03&amp;entry=entry100322-215935</comments>
		</item>
		<item>
			<title>Microsoft Office 2007 - Configure each time on startup</title>
			<link>http://blog.larmib.com/index.php?entry=entry100223-031155</link>
			<description><![CDATA[<h3>Problem</h3><br />Microsoft Office 2007 wants to configure itself each time the application starts. This was tested on Windows Vista Home Premium.<br /><br /><h3>Solution</h3><br /><br />Download and install this Microsoft application: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&amp;displaylang=en" target="_blank" >SubInACL.exe</a> from Microsoft<br />Click on start, run type notepad and click OK.<br />METHOD ONE:<br />Copy and paste the following into the notepad window:<br /><br />cd /d &quot;%programfiles%\Windows Resource Kits\Tools&quot;<br />subinacl /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office /grant=administrators=f /grant=system=f<br /><br />note: You could replace administrators with the user you are having the problem with as well, or add it in like this: /grant=USERNAME=f.<br /><br />Click on File &gt; Save As and in the named box put c:\fix_reg.bat and change the Save as type to All Files.<br />Close out of the Notepad window and click on start, run then type cmd and click OK.<br />In the command prompt window type c:\fix_reg.bat (or if you named it something else type that name in) and press enter. This may take a while to completely. All this does is simply give the administrators group, and the system user full access to all of those registry keys (depending on what method you use), which they should have that access anyway.<br /><br />If you are having other computer related problems this may not resolve your issue. I would get in contact with a professional who can make the right choice on what to do next. This also is a registry fix, as with any registry related fix this may cause undesired effects in some cases. I have ran this on my own computer and have not had any issues. With that said, run at your own risk.<br /><br /><h3>What does this do?</h3><br />This will simply grants access to the registry for the Administrators group, as well as the System user. These groups in reality should have had access anyway.]]></description>
			<category>Applications</category>
			<guid isPermaLink="true">http://blog.larmib.com/index.php?entry=entry100223-031155</guid>
			<author>Larry Johnson</author>
			<pubDate>Mon, 22 Feb 2010 22:11:55 GMT</pubDate>
			<comments>http://blog.larmib.com/comments.php?y=10&amp;m=02&amp;entry=entry100223-031155</comments>
		</item>
		<item>
			<title>DotNetNuke redirection loop fix</title>
			<link>http://blog.larmib.com/index.php?entry=entry100223-023342</link>
			<description><![CDATA[I&#039;ve been dealing with a DotNetNuke redirection loop for a few days now and have figured out that one or a mixture of the following solutions may help resolve the problem.<br /><br /><h3>How do you fix it?</h3><br />
<ol>
 <li>
This could be a problem with your MSSQL Database. There is a table called PortalAlias. In that table lists any and all locations of where the portal is and it's alias. To correct the issue view that tables entries and if you do not see your domain in there with the proper folder you may be able to fix this by adding it in there. Do NOT use a trailing slash "/" at the end. If you have yours in a folder make sure you enter the name of the folder such as: larmib.com/dnn
 </li>
<li>If that does not work you will need to modify the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config file and add requiresPermission="false" to the end of the SectionGroup system.web under the section compilation, and deployment. Save the file, and then try again. If you host your websites with a company you need to contact them and have them do this for you.</li>
<li>This could be an issue with the version of system.web.extensions. If the server has version 3.5.0.0 it may be conflicting with the version you have in your web.config. The way you fix this is by making a backup of your current web.config, then open the web.config in a text editor and do a find and replace. You will be looking for "Version=1.0.61025.0" and replacing it with "Version=3.5.0.0".</li>
</ol>
<br /><h3>What order should I do things?</h3><br />I would first try to fix the PortalAlias issue as it may be the cause and is easier in most cases to fix than trying to involve your hosting company, or play with settings you don&#039;t need to. Secondly It could be a problem with the version of system.web.extensions you are using, on your hosting account. You can get that fixed by trying the version change. I would like to note that there were causes where the version change from 1.0.61025.0 to 3.5.0.0 did not fix the issue, which leads me to the last thing which is to add requirePermissions=&quot;false&quot; being added to the machine.config file. If that is done you, and you did switch your system.web.extensions version to 3.5.0.0 and it is still not working, then revert back to the 1.0.6.1025.0 version, that may do the trick as it worked for me.<br /><br /><h3>What causes this problem?</h3><br />There are two reasons why this problem happens.<br />
<ol>
 <li>Your PortalAlias table has a trailing "/". Example: larmib.com/dnn/ simply remove the trailing "/" so it looks like this larmib.com/dnn and that will fix it.</li>
 <li>An error loop for the AJAX extensions.<br>
This is the problem if you download the source, PageBase.vb:
<pre><code>
If objBasePortalException.Message.Contains("System.Web.Extensions") Then
 ' suppress AJAX error in Medium Trust
 Response.Redirect(strURL)
Else
</code></pre></li>
</ol>
<br />]]></description>
			<category>Hosting</category>
			<guid isPermaLink="true">http://blog.larmib.com/index.php?entry=entry100223-023342</guid>
			<author>Larry Johnson</author>
			<pubDate>Mon, 22 Feb 2010 21:33:42 GMT</pubDate>
			<comments>http://blog.larmib.com/comments.php?y=10&amp;m=02&amp;entry=entry100223-023342</comments>
		</item>
	</channel>
</rss>
