473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

VB Questions re C Programming

I am new to .Net and am currently learning using vb in a project using
WebMatrix not Visual Studio.

I have found an article regarding password security that is written in C
code and I am unsure of how to implement it into my project.

I am able to create and compile .vb files and I understand how to include
code in the aspx and ascx files.

The article referred to is below and states "The class we presented in
today's article can be built into your own .NET projects - either directly
in C# projects or as an assembly in other programming languages." the only
question is how ?
http://www.aspheute.com/english/20040105.asp
Thanks
Murphy
Nov 18 '05 #1
4 972
Hi, Murphy,

From the project you will need only the class DotNetGermanUtils.Password
which is in the file Password.cs. So, first decompress this file to a folder
of your choise.

Now you have 2 options - option one, which is the harder one, is to
translate this to VB.NET.

Option two is to build this class to a .dll:
Open the command prompt (Start->Run, type cmd and click OK). Then either add
to the current path the path to the .NET Framework folder, i.e:

set path=%path%;C:\Windows\Microsoft.NET\Framework\v1. 1.4322\

or change the current directory to the above one. Depending on the version
you have the last folder name will be different, take the name from Windows
Explorer.

If you have decomressed the file Password.cs to C:\ you can build it like
this:

csc /target:library /out:C:\password.dll /r:System.dll C:\Password.cs

Then just add the .dll file to the bin folder of the web application you are
intending to use it.

Hope this helps
Martin
"Murphy" <mu****@murphy.com> wrote in message
news:Ol**************@TK2MSFTNGP12.phx.gbl...
I am new to .Net and am currently learning using vb in a project using
WebMatrix not Visual Studio.

I have found an article regarding password security that is written in C
code and I am unsure of how to implement it into my project.

I am able to create and compile .vb files and I understand how to include
code in the aspx and ascx files.

The article referred to is below and states "The class we presented in
today's article can be built into your own .NET projects - either directly
in C# projects or as an assembly in other programming languages." the only
question is how ?
http://www.aspheute.com/english/20040105.asp
Thanks
Murphy

Nov 18 '05 #2
Martin, you are fantastic...

Thanks a million

Murphy

"Martin Dechev" <de*******@hotmail.com> wrote in message
news:ef**************@TK2MSFTNGP11.phx.gbl...
Hi, Murphy,

From the project you will need only the class DotNetGermanUtils.Password
which is in the file Password.cs. So, first decompress this file to a folder of your choise.

Now you have 2 options - option one, which is the harder one, is to
translate this to VB.NET.

Option two is to build this class to a .dll:
Open the command prompt (Start->Run, type cmd and click OK). Then either add to the current path the path to the .NET Framework folder, i.e:

set path=%path%;C:\Windows\Microsoft.NET\Framework\v1. 1.4322\

or change the current directory to the above one. Depending on the version
you have the last folder name will be different, take the name from Windows Explorer.

If you have decomressed the file Password.cs to C:\ you can build it like
this:

csc /target:library /out:C:\password.dll /r:System.dll C:\Password.cs

Then just add the .dll file to the bin folder of the web application you are intending to use it.

Hope this helps
Martin
"Murphy" <mu****@murphy.com> wrote in message
news:Ol**************@TK2MSFTNGP12.phx.gbl...
I am new to .Net and am currently learning using vb in a project using
WebMatrix not Visual Studio.

I have found an article regarding password security that is written in C
code and I am unsure of how to implement it into my project.

I am able to create and compile .vb files and I understand how to include code in the aspx and ascx files.

The article referred to is below and states "The class we presented in
today's article can be built into your own .NET projects - either directly in C# projects or as an assembly in other programming languages." the only question is how ?
http://www.aspheute.com/english/20040105.asp
Thanks
Murphy


Nov 18 '05 #3
Martin, one more question if I may...

I have compiled the code into a dll in the bin directory of my app however I
am having problems accessing the functions as there is a function and a
class that both share the name 'Password' and this is causing errors...

The code I am trying to use is below 'namespace.class' however when I
reference the class the compiler is expecting arguments for password as this
is also a function:
Dim securitysystem As DotNetGermanUtils.Password = New
DotNetGermanUtils.Password()
Dim password as String = securitysystem.CreateRandomPassword(8)
Dim Salt as Integer = securitysystem.CreateRandomSalt()

Ther error received is:
Compiler Error Message: BC30455: Argument not specified for parameter
'nSalt' of 'Public Sub New(strPassword As String, nSalt As Integer)'.

Thanks Murphy

"Martin Dechev" <de*******@hotmail.com> wrote in message
news:ef**************@TK2MSFTNGP11.phx.gbl...
Hi, Murphy,

From the project you will need only the class DotNetGermanUtils.Password
which is in the file Password.cs. So, first decompress this file to a folder of your choise.

Now you have 2 options - option one, which is the harder one, is to
translate this to VB.NET.

Option two is to build this class to a .dll:
Open the command prompt (Start->Run, type cmd and click OK). Then either add to the current path the path to the .NET Framework folder, i.e:

set path=%path%;C:\Windows\Microsoft.NET\Framework\v1. 1.4322\

or change the current directory to the above one. Depending on the version
you have the last folder name will be different, take the name from Windows Explorer.

If you have decomressed the file Password.cs to C:\ you can build it like
this:

csc /target:library /out:C:\password.dll /r:System.dll C:\Password.cs

Then just add the .dll file to the bin folder of the web application you are intending to use it.

Hope this helps
Martin
"Murphy" <mu****@murphy.com> wrote in message
news:Ol**************@TK2MSFTNGP12.phx.gbl...
I am new to .Net and am currently learning using vb in a project using
WebMatrix not Visual Studio.

I have found an article regarding password security that is written in C
code and I am unsure of how to implement it into my project.

I am able to create and compile .vb files and I understand how to include code in the aspx and ascx files.

The article referred to is below and states "The class we presented in
today's article can be built into your own .NET projects - either directly in C# projects or as an assembly in other programming languages." the only question is how ?
http://www.aspheute.com/english/20040105.asp
Thanks
Murphy


Nov 18 '05 #4
Hi, Murphy,

This class has only one constructor that takes 2 parameters. So you should
first generate the random password and salt and then pass these to the
constructor. This is how it is done in the TestApplication.cs file - though
it is in C# the code is quite simple and I'm sure you will understand what
it does. Moreover, there are comments explaining it.

So your code should be:

Dim RandomPassword as String = _
DotNetGermanUtils.Password.CreateRandomPassword(8)
Dim RandomSalt as Integer = _
DotNetGermanUtils.Password.CreateRandomSalt()
Dim securitysystem As DotNetGermanUtils.Password = _
New DotNetGermanUtils.Password(RandomPassword, RandomSalt)

And then calculate the hash etc.

Hope this helps
Martin
"Murphy" <mu****@murphy.com> wrote in message
news:O8*************@TK2MSFTNGP12.phx.gbl...
Martin, one more question if I may...

I have compiled the code into a dll in the bin directory of my app however I am having problems accessing the functions as there is a function and a
class that both share the name 'Password' and this is causing errors...

The code I am trying to use is below 'namespace.class' however when I
reference the class the compiler is expecting arguments for password as this is also a function:
Dim securitysystem As DotNetGermanUtils.Password = New
DotNetGermanUtils.Password()
Dim password as String = securitysystem.CreateRandomPassword(8)
Dim Salt as Integer = securitysystem.CreateRandomSalt()

Ther error received is:
Compiler Error Message: BC30455: Argument not specified for parameter
'nSalt' of 'Public Sub New(strPassword As String, nSalt As Integer)'.

Thanks Murphy

"Martin Dechev" <de*******@hotmail.com> wrote in message
news:ef**************@TK2MSFTNGP11.phx.gbl...
Hi, Murphy,

From the project you will need only the class DotNetGermanUtils.Password
which is in the file Password.cs. So, first decompress this file to a

folder
of your choise.

Now you have 2 options - option one, which is the harder one, is to
translate this to VB.NET.

Option two is to build this class to a .dll:
Open the command prompt (Start->Run, type cmd and click OK). Then either

add
to the current path the path to the .NET Framework folder, i.e:

set path=%path%;C:\Windows\Microsoft.NET\Framework\v1. 1.4322\

or change the current directory to the above one. Depending on the version
you have the last folder name will be different, take the name from

Windows
Explorer.

If you have decomressed the file Password.cs to C:\ you can build it like this:

csc /target:library /out:C:\password.dll /r:System.dll C:\Password.cs

Then just add the .dll file to the bin folder of the web application you

are
intending to use it.

Hope this helps
Martin
"Murphy" <mu****@murphy.com> wrote in message
news:Ol**************@TK2MSFTNGP12.phx.gbl...
I am new to .Net and am currently learning using vb in a project using
WebMatrix not Visual Studio.

I have found an article regarding password security that is written in C code and I am unsure of how to implement it into my project.

I am able to create and compile .vb files and I understand how to

include code in the aspx and ascx files.

The article referred to is below and states "The class we presented in
today's article can be built into your own .NET projects - either directly in C# projects or as an assembly in other programming languages." the only question is how ?
http://www.aspheute.com/english/20040105.asp
Thanks
Murphy



Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: Rick | last post by:
Hi, I'm currently preparing for an interview on VB.Net Development.. could someone please give me an idea as to what type of questions can one ask (it's a practical test) and what sort of things...
0
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for...
0
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for...
0
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for...
1
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.