I don’t know if this product is widely known here but it
came up in conversation yesterday so I thought I’d share. In my opinion, it’s
one of the most useful tools around…and it’s free. Spend a bit of time with it
and see for yourselves.
Thursday, 13 February 2014
Manage multiple remote windows
It
was annoying having to manage multiple remote windows so I searched around. I
found a decent free app to manage them in a tabbed interface so I thought I’d
share:
http://terminals.codeplex.com/
We can also use RoyalTS (http://www.royalts.com/main/home/win.aspx)
Free version has limit of 10 saved connections
but license is only $39 (if you feel you need more).
Sunday, 13 October 2013
Visual Studio : Creation of the virtual directory http://localhost failed
When creating a copy of an application from Visual Source Safe, sometimes developers get the following error message :
The local IIS URL http://localhost/ specified for Web project DemoWebsite has not been configured. In order to open this project the virtual directory needs to be configured. Would you like to create the virtual directory now?
After clicking ‘Yes’, a new error message will be displayed:
Creation of the virtual directory http://localhost/ failed with the error: The URL ‘http://localhost/’ is already mapped to a different folder location.
All the projects will be loaded expect for a project which states unavailable and by right-clicking the project and selecting the option of editing the file with an extension of either .csproj or .vbproj.
In the file, find <iisurl> tag with localhost.( <iisurl>http://localhost/</iisurl>) Change the tag details to your application name (<iisurl>http://localhost/yourapp</iisurl>). Reload the project and you should be able to load the project now.
Monday, 3 June 2013
ASP/ASP.NET Session
Timeout – How Do I Change It!?
20 minutes… 20 minutes… 20 minutes… Does this sound
familiar?
You’re trying something simple, or so you thought, and
increasing the session timeout of your website, but it doesn’t appear to be
having any effect.
ASP.NET
Usually, the first and easiest thing to do is just change
the configuration/system.web/sessionState@timeout value to something like
“90″. This should mean that you’d like
your users’ sessions to be persisted until a 90 minute window of idle time has
elapsed.
web.config
<system.web>
...
<sessionState
timeout="90" />
...
</system.web>
</configuration>
So, what do you do now? You go ahead and make sure it works…
but wait… it still appears to be timing out after 20 minutes.
This doesn’t make any sense, it explicitly says that the
session timeout should be exactly 90 minutes.
There’s a couple of issues that are tied together here:
·
The application pool’s worker process default
idle timeout is also set to 20 minutes
·
The default mode of storing session state is in the
IIS process
Application Pool Idle
Timeout
The settings for the application pool can be found by
clicking Properties (IIS 6) or Advanced Settings (IIS 7.5) on the application
pool that the application is assigned to.
Ensure this value is set to the timeout of your session, at
a minimum, to ensure that all sessions persist for the entire session timeout
period.
The reason that these two values are dependent on one
another is because the session information is actually stored within the worker
process of the application pool. That is to say, if the worker process is
shutdown or killed for any reason, the session information will be lost.
Session Storage Mode
There are the modes of storing the session information:
- · InProc (or In Process) – Default – Stores session information within the IIS worker process
- · StateServer – Stores session information in a separate process (the ASP.NET state service)
- · SQLServer – Stores session information in a SQL database
The only mode that is vulnerable to losing session
information on a worker process is when the state is stored in the worker
process. Both StateServer and SQLServer modes are not affected by worker
process resets. Likewise, StateServer and SQLServer modes are the only options
when it is necessary to share session state across more than a single IIS
server.
For more information about these modes, check out MSDN.
ASP
There’s two ways to change the session timeout when you’re
dealing with classic ASP.
You can set it at the application level, or
programmatically, which means that the value can be different within the
application.
Application Level
Since it doesn’t specifically state that the setting is for
classic ASP, it may be confusing to know that the value is in: Application
Properties -> Configuration… -> Options -> Enable session state.
It’s as simple as updating this value, and the session
timeout for your entire classic ASP application is changed!
Programmatically
You can also use modify the Session.Timeout property at
runtime to affect the timeout period of the session. One popular location to
put this piece of code is in the global.asa file.
global.asa
<script language="VBScript"
runat="Server">
Sub Session_OnStart
Session.Timeout = 90
End Sub
</SCRIPT>
Tuesday, 7 May 2013
Quick Reference- Working with Recordsets VBA
Sub testSqlRuns()
'Purpose: Open a recordset using ADO.
Dim rs As New
ADODB.recordSet
Dim cn As New
ADODB.Connection
Dim
strSQL As String
Dim
strConnString As String
strConnString
= "Provider=SQLOLEDB;Data Source=US440;" & _
"Initial Catalog=Test;" & _
"User
Id=user;" & _
"Password=pwd;"
strSQL =
"SET NOCOUNT ON;" & vbCrLf & _
"SELECT TOP 5 * FROM Issue"
cn.Open
strConnString
' record
count will be -1 for forward only recordsets
'
adOpenForwardOnly is default and fastest. You can go through the recordset
start to finish once.
' Once you reach EOF you can not use the
recordset.
' Best for when you need to do one pass
through the data
rs.Open
strSQL, cn, adOpenForwardOnly
Debug.Print
rs.RecordCount
rs.Close
Set rs =
Nothing
Set rs =
New ADODB.recordSet
' You need to
specify adUseClient to tell data provider that you are going to be browsing
records
' on the excel client (vs SQL Server)
rs.CursorLocation
= adUseClient
'
adOpenStatic takes a snapshot of data as of the time command was run.
' Allows parsing recordset any way you
want. Will not reflect changes to data,
' but this is ok.
' but this is ok.
rs.Open
strSQL, cn, adOpenStatic
Debug.Print
rs.RecordCount
Do While
Not rs.EOF
Debug.Print rs.Index & ";" & rs!issue_name
rs.MoveNext
Loop
rs.Close
Set rs =
Nothing
End Sub
Thursday, 2 May 2013
Datasets / Report data window vanishes - BIS 2008
You open the project and the window panel for the Report Data containing the parameters and datasets isn't there. I spent a bit of time enabling/disabling toolbars before I found this.
- Open a Report solution (or have one open already?)
- The menu link is "report data" and it's right at the bottom of the "View" menu.
Subscribe to:
Posts (Atom)