Sunday, June 1, 2008

Fibrids Back And Foot Pain

VSS Update for Internet via HTTP

Hello

The 2005 version of Visual SourceSafe has the option to access a database from anywhere in the world via HTTP so easy and simple, then I will describe how to configure VSS to share a DB to allow access via Iinternet.

to use the following scenario a server 2003 in which BD is the VSS and we will be an XP machine, both must have the VSS installed. There are 2 ways to configure Internet access from one is using SSL (secure socket layer) and the other without using SSL, the latter is easier to configure but also less secure because the information is transferred as plain text and is therefore susceptible to theft.

For both types of access should be installed, configured and published on IIS on a computer

Let

access without SSL

  • First of all must share the folder in which it was created BD SourceSafe, for this just open a browser windows and folder sharing, you have to take into account the access permissions to that folder via LAN for users who will have access to the database. Suppose that our database is in the folder D: \\ ss \\ mydb
  • Now that we have shared the DB on the LAN administrator open up the VSS (SSAdmin) and open the database but with UNC address \\ \\ mymachine \\ mydb
  • Once we open the database with management the option is enabled UNC Server \\ Settings No, let's go to that opcióny Check to "Enable SourceSafe for this computer" and also "Enable SourceSafe Internet for this database "then place the IP or DNS name of the team's web server, which is supposed to have IIS up and running.
  • VSShttp1
  • Pressing accept elsiguiente receive warning
  • VSShttp2
  • Press NO to continue working without SSL
  • That would be everything you need, now let's try if all is well we test access from the Internet by opening an IE and putting the IP of the site indicated inthe Settings, call the webservice that is automatically configured on our IIS, something similar to the following:
    http://205.150.152.001/SourceSafe/VssService.asmx


  • If all is well see a window asking for a valid user on the server, there must give the name and password of a valid user of the server that has access to the shared folder count is the BD server, you must have read / write permissions. One very important thing to understand here is that if we do not use SSL, the WAS (Web Service) VSS uses impersonation which means that the user provided when the Explorer we requested must have read / write permissions to the folder of the BD and it MUST be created as user in the VSS database, finally you must activate the option & # 243; n "Use network name for the user's Session start automatically" is at Tools / Options / General, this is set up well by default. Well if this is true will fail WAS but one in which we see that actually is responding, we realize that this error is entitled as follows: "Error application server in '/ SourceSafe'. "

Well now that you have everything properly configured on the server, go to the remote machine that seeks access to the database. Well this is the most simple and consists of the following: Open the

  • VS2005, go to Tools / Options / Source Control / Selection of complement and there ; selects Microsoft Visual SourceSafe (internet) and in the following figure
  • VSShttp3
  • Now go to Tools / Options / Source Control / Configuration complement, place the name of the user who has access to the database and the server, then click Advanced and destickee the option to use SSL, as inthe following figure:
  • VSShttp4

Well that's it for configuration, now we only tested for example by opening a solution that we already have in the database. For this there is a procedure "Special" is the comment below: Let us open

  • VS2005 Let
  • Open Project and then set to "SourceSafe (Internet)"
  • 's select "Add SourceSafe database, a wizard that will ask the IP or domain name (in my example http://205.150.152.001 ) and folder shared ( \\ \\ mymachine \\ mydb ), to give the following, if the connection does ask for a username and password on the target machine, the user must provide, if properly authenticate us ask us to give a name to the conexióny ready.
  • Now only select the project you want to open in the BD and ready brazen VS2005 project will start in our project default folder which is set to (tools / options / projects and solutions / general / VS projects location)

I commented that I use this way and it really works well is f & # 225; easy to use and its configuration is not no big deal, just be careful with permissions to the folders in the database and make sure your domain users using the BD est & # 225, n created as users of the BD

Well that's all for now, I hope to guide them up soon!, I describe another access via SSL

salu2 SergioT

Thursday, May 22, 2008

Draft A Letter For Short-term Traineeship

VSS VB.net and the decimal point in the textbox

Hello

The temita Eastern cultural references and combined with what he says the truth locale that is more than a headache for At least for me I'm no guru on this. One of the few things I miss the dbase was the picture command with a simple model very easily limited data entries above the numbers. Here in vb.net give us the "easy" to program for different cultures so that the result can be much more friendly to the end user and the system will behave according to what he says the locale of the computer, the Burrera is that programming is very complicated, well ... either case.

Here is an recetita to handle the textbox with numbers so as to use the dot "." decimal separator regardless of what you set on the control panel, Assume that the machine has to eat, "as the decimal point and thousands separator (as is usually in Latin America) Place a

textbox, a button in a winform and paste the following code in the codebehind

Private Sub Form1_Load ( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .
Load Dim x As Decimal
x = 25,356 'Look how the assignment is to point
I . TextBox1 . Text = x
End Sub Private

Sub Button1_Click (ByVal sender As System.Object, ByVal and As System.EventArgs) Handles
Button1.Click Dim x As Decimal
x = I . TextBox1.Text 'From here comes with coma and almost automatically becomes
MsgBox (x)
End Sub

So far everything works very well as placing a number with a decimal point textbox becomes comatose as says the locale and then passing a textbox to a number become the comma point.

Well now assume that the user has the "silly idea" to use for a decimal point. that it is a "complacent" who wants to enter numbers with speed and comfort using the keypad on your keyboard. make the attempt in the textbox we already have on the screen and type " 25,356 ", then press and see that they get: "25356 " what happened?? it turns out that the very intelligent VB thought that we are using the thousands separator "." and discarded. Well

to give the user the convenience of using your numeric keypad can build a user control and monitor each press of keys to bind or set point using the events of textbox to do the same or we can make a simpler validation in time to retrieve and assign values \u200b\u200bof textbox to numbers and vice versa. While the latter to extend a textbox and a button on the winform and replace the previous code as follows:

Private Sub Form1_Load ( ByVal sender As System.Object, ByVal and As System.EventArgs) Handles MyBase .

Load

Dim x As Decimal
x = 25,356 'Look how the assignment is to point
I . TextBox1.Text = x
I . TextBox2.Text = x.ToString (System.Globalization.CultureInfo.InvariantCulture)

End Sub

Private

Sub Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

Button1.Click Dim x As Decimal

x = I . TextBox1.Text 'From here comes to eat and almost automatically becomes

If x.ToString \u0026lt;> I . TextBox1.Text Then

MsgBox (

"Not a valid number, use the decimal point" , MsgBoxStyle.Critical)
Return

End If
MsgBox(x)
End Sub

Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Dim x As Decimal = Decimal .Parse( Me . TextBox2.Text, System.Globalization.CultureInfo.InvariantCulture)

If x.ToString (System.Globalization.CultureInfo.InvariantCulture) \u0026lt;> I . TextBox2.Text . Trim
Then MsgBox

(

"Not a valid number, be sure to use decimal point" , MsgBoxStyle.Critical)
Return


End If
MsgBox (x)
End Sub

Well now I will explain the changes I made to the form: let's look at the load event the following statement:

I . TextBox2.Text = x.ToString (System.Globalization.CultureInfo.InvariantCulture)

This operation it does is get a reference to "cultural body of all languages" which is based on English culture, as you know runs the point like a decimal point, and therefore what we are accomplishing is ignore the locale!! For this reason you will see that on the screen (textbox2) appears as a number with a decimal point, just what I wanted to achieve.

Now we will see the representative of buuton2 where we recover the value of the textbox and place it in the numeric variable

Dim x As Decimal = Decimal . Parse ( Me . TextBox2.Text, System.Globalization.CultureInfo.InvariantCulture)

In this line of textbox convert the string through Decimal Parse method of repeating the request for the independent of the locale, this is because we assume that the text is decimal separator. Finally

analyze validation that ensures we are using the dot as thousands

If x.ToString (System.Globalization.CultureInfo.InvariantCulture) \u0026lt;> I . TextBox2.Text.Trim Then

MsgBox (

"Not a valid number, be sure to use decimal point" , MsgBoxStyle.Critical)

Return

End If

Validation is as simple as comparing the string obtained from the variable x against the text stored in which we did textbox2 conversion. If they are different is that the user used the comma if they are equal is that the user used the point and everything is fine.

This example will you put the 2 options that are driving around with regional settings (managed by textbox1 and button1) and management with point as decimal separator (managed by textbox2 and button2)

I hope they can

Salu2
SergioT

Thursday, May 15, 2008

Cubefield Armour Games

Variables postbacks persistent sources

One problem that we face as we program in asp.net is the fact that the variables declared in a webform "die" after the first postback to save variables between postbacks there are several alternatives, the use of Session, Application or ViewState, which is used depends on what you want to do, very simple I detail when to use each of the 3 options Session

  • : You must use if you want to store variables and objects throughout the session, a session means a connection to the web server from a browser. The variables placed in Session live while the explorer is opened and interacted with the site. to put variables here just to do the following: dim

    xVar
    as integer = 199 Session ("myvariable") = xVar

    and to recover

    dim z as integer = session ("myvariable")
  • Application: Variables stored here while living application live on the web server, usually are placed here and Obet variables to be used by all users using the application, So yes, if one changes the value of the variable stored in application, this change is reflected to all connected users (all sessions). To save variables or objects becomes:

    xVar dim as integer = 199
    Application ("myvariable") = xVar

    and retrieve

    dim z as integer = Application ("myvariable") ViewState
  • : The variables or stored objects that live here live a webform, and ViewState is ASP.Net mechanism to save web control values \u200b\u200bin postbacks, it is actually a hidden variable that the customer comes and goes with the values \u200b\u200bof WebForm controls. What makes this mechanism usually take the opportunity here to save themselves the form variables are important only in the webform, it is therefore not advisable to store them in Session or Application. ViewSat To do it:


    dim as integer = 199 xVar
    Me.ViewState ("myvariable") = xVar

    and retrieve

    dim z as integer = Me.ViewState ("myvariable")

In either the 3 mechanisms have to be careful not to try to retrieve a nonexistent variable that can cause a runtime error and returned the 3 mechanisms are nothing if not variable

For the next installment I'll show you how to save their own objects in these using the serialization mechanisms, something very basic and easy to use. Salu2


Sergio