.net - Keep A Class In A Central Location And Reference It From Multiple Websites?

Aug 19, 2009

We have several VB.NET websites running internal applications. These sites are often modified with minor changes, and are maintained on the server as uncompiled code. I'm looking for the best way to maintain classes so that we can reference them from multiple websites.

Specifically, we're looking to put some common functions (error logging, common database calls, etc.) into a centralized location where they can be maintained separately from the sites and called as needed. And we'd prefer to have this on the server as uncompiled code, so it can be uploaded without precompiling. I feel like I'm missing something obvious, but what is the best way to set this up?

View 3 Replies


ADVERTISEMENT

Build A Menu From Multiple Xml Files In A Central Location?

Nov 1, 2011

I am wanting to build a menu from multiple xml files in a central location this will be to help with adding crystal reports after application has been deployed to an end user.I am able to get the list of all the xml files in a folder it is just the adding the ReportName to the different menu buttons i have set up.

Dim dirs As String() = Directory.GetFiles(Application.StartupPath & "Reports", "*.xml")
Dim dir As String For Each dir In dirs Dim xe As XElement = XElement.Load(dir)Next

View 9 Replies

Multiple Apps With Central Database

May 8, 2009

I have an application which writes to and reads from a database. I'd like to be able to have the application installed on a number of computers with the database installed on a central server which all of the applications will connect to.

first of all, installation (installing the app is simple, but how can I get an install program to put the database on the server?), and next, concurrency errors?

I understand that having more than one person trying to update the database at the same time is likely to cause concurrency errors, but short of deploying my application and having everyone try to write to the database at once, I'm not sure how to approach this.

View 8 Replies

C# :: Reference Configuration Information From Within Multiple Class Libraries?

Mar 13, 2009

I've got a bunch of DLL projects that I'm pulling into my application, each contains their own Settings.settings/app.config. When I compile the app and run for debugging, everything works just fine, but come deployment time I can't get my DLLs to read their own settings files.I've been doing some reading and it has become apparent that there's a couple of methods to getting each dll to read its own configuration - one is to dedicate a .dll.config to the library and the other is to embed the dll's configuration in the process.exe.config.I'm having significant issues trying to implement either and I wondered if anyone has any good docs on this - there appears to be a shortage on the Net.

I'd like a separate .dll.config for each of the libraries if possible, but in a pinch, getting each of my libraries to read their own section of the process.exe.config will he right direction because I'm so close to rolling this application out but this stumbling block is causing me a significant headache.Edit: When I merge the configuration files, I start getting TypeInitializer exceptions when I initialize objects withing my libraries. This is likely just me being retarded, but does someone have a working example of a merged config file and some basic demonstrative code for reading it from multiple assemblies?

View 3 Replies

Loading Multiple Websites With A Different Variable In Each, Based On Textbox Inputs?

Aug 24, 2011

I am a former IT student and have not used VB in a little while but feel it can come in handy to help me complete some tasks at work.I am trying to write a small program which will open a url + a number for each number entered into the textbox. As an example lets say the website is "www.google.com/id=" and I enter into a textbox 3 values such as "134,325,2112", www.google.com/id=134, www.google.com/id=325 and www.google.com/id=2112 would all open at once.

The purpose of this is at work, we have an employee database and would like to load multiple employees at once (upto 6 at a time) to compare profiles. The issue with doing this manually is we have to fill out the search criteria for each, instead, I would like to load a link with parameters in it already filled out + the employee number we are searching for each number entered into a textbox on a VB form.

View 2 Replies

VS 2005 Adding .dll As Reference From Another Location?

May 25, 2009

I am going through a problem, i want to add some dll in my Project from another location.

Scenerio:

1-I am using a third party control

2-Installed it

3-All dll are in reference list, if i add them from their default folder and make local copy true,it works fine

i want to add them from "MyFolder"??How to refer them in my project?? current it gives error like

"could not load file or assemblies..*.dll.."

View 7 Replies

How To Assign A Different Reference To A Class Instance From Inside The Class Code

Jan 18, 2011

my proble is the following: I have a class MyClass and another class Modifier, which has a method ModifyMyClass(ByRef mc as MyClass) that receives a MyClass instance as ByRef parameter to modify it. A smell of the code is:

[Code]...

View 4 Replies

VS 2008 Reference Parent Class From Inside Child Class?

Apr 11, 2009

I have a 'property management class' that contains several functions and properties. I have several other classes that use the 'management class' as a property to derive the value of several of its other properties.Is there a way for me to reference the outer class from the 'management class' functions without having to pass it as a parameter? I ask because several different classes can have this 'management class' as a property and am having a hard time typing the parameter.

View 7 Replies

Class With Class Properties: AObject Reference Not Set To An Instance?

Aug 19, 2009

I have a class in which some of the fields are also classes.I can put values in the "normal" properties, but in the others when o try to assign values it gives the: "Object reference not set to an instance of an object"But the code compiles fine.

dados_Defenicao = New ServiceReference1.draftClaimEntryDefinition
dados_Defenicao.arCode = "123"
dados_Defenicao.claimMarket.warrantyType = "w" - Here it gives the error

How can i fix this ?

View 6 Replies

Class With Class Properties: Object Reference Not Set To An Instance

Aug 19, 2009

I have a class in which some of the fields are also classes.

I can put values in the "normal" properties, but in the others when o try to assign values it gives the: "Object reference not set to an instance of an object"

But the code compiles fine.

dados_Defenicao = New ServiceReference1.draftClaimEntryDefinition
dados_Defenicao.arCode = "123"
dados_Defenicao.claimMarket.warrantyType = "w" - Here it gives the error

View 4 Replies

Get Base Class Object Reference Outside The Class's Definition?

Dec 10, 2010

If we are within the derived class then ofcource we can use MyBase keyword to access base class's object reference . That's fine , how can we take that base class's object reference outside that derived class's definition.My following code will explain what i want . Actually that is giving error right now, but it is explaining my requirement .

Public Class Base
Public x As String
End Class

[code]....

Actually there is error in ReadOnly Property BaseReference's Getter . Error is "Error 1 'MyBase' must be followed by '.' and an identifier. " how can i get base class object reference in Main method ?

View 1 Replies

Reference A Parent Class Object From A Child Class?

Jan 2, 2010

I have a Parent Class Called Fuselage that containsfour child classes called Forebody, CenterBody, AftBody, and CrossSection. CrossSection classcontains objects common to Forebody, CenterBody, and Aftbody (example: width). How do I access thewidth property in CrossSection from within the classForebody?

Public Class Fuselage
Dim Forebody As ClsSection
Dim Centerbody As ClsSection

[code].....

View 6 Replies

Use The ComboBox Items To Reference Specific Spreadsheets At Location

Mar 18, 2010

I'm trying to use the ComboBox items to reference specific spreadsheets at location 1 and copy them to one singular spreadsheet as location 2.

oExcel = CreateObject("Excel.Application")
myDirM = "L:DC Productivity ReportTA Temp"
oBook2 = oExcel.Workbooks.Open("C:TestBook1.xlsx")

[Code]......

View 5 Replies

Get A Reference To The Class That Creates An Instance Of Another Class?

May 20, 2010

I need to create a new instance of a class that needs a member of the calling class. But i can't pass a reference to the calling class through the constructor.The solution i am looking for is something like this:

Public Class ChildClass
Public Sub New(args)
_MyMember = GetMemberFromCallingClass()

[code]....

I want this to work without having to manually pass any references or variables from the calling class to the new instance of ChildClass.

View 2 Replies

MDI Forms Location/Class-function?

Jan 8, 2009

I want to create a function (class?) that will have stored the coordinates(values) of my mdiforms, so I can call it whenever I want to dispaly the mdiforms. I want to avoid retyping again and again (in every mdi form) the above Me.Top=5 Me.Left=150 on forms load.

View 2 Replies

Avoid Multiple Login From Different Location?

Jun 27, 2010

How can i avoid multiple log into the application at the same time from different locations? If one user is logged in and the other user uses the same ID and PW to log in then he/she will not able to log in.

View 8 Replies

Copying Multiple Folders From One Location To Another?

May 17, 2012

I recently designed a web application using VB.Net and tried to copy a folder (containing multiple files) from one disk drive to another but unfortunately I didn't succeed.I tried using a file upload but that is only for single/multiple file selection however I want to select a complete folder instead of multiple files.

View 4 Replies

How To Load Multiple Same Forms Location

Sep 20, 2010

Hi,

How to load multiple SAME forms location? I have no problem to load 2 different forms' location but the multiple same forms' locations.

The following code is for loading the different forms:

Private Sub Menu_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.Location = My.Settings.Location
Me.Visible = True

'Usually i have multiple Form1 are opened when i close app.
Dim f1 As New Form1
f1.Location = My.Settings.test
f1.Visible = True

End Sub


Thank you for the helps!

View 4 Replies

Defining A Class For Multiple Child Class Instances?

Feb 10, 2011

I have created a class for a Sports Facility. A facility has a Name, Status, Notes, etc as members of the class. This works well, I can create a new instance of an exisitng Sports Facility from the database, create a new instance, etc. All working well.What I am stuck on is accessing a list of Sports Facilities. I know I can create a new list by doing

Dim List As New List(Of Facility)

For Each fRow As DataRow In ds.Tables("Facilities").Rows

List.Add(New Facility(fRow.Item("FacilityID"))

Next

View 4 Replies

Run On Client Machines From Central Server

Jun 11, 2011

I have created an application using ODBC data sources.it runs on a local machine well. but i want it to run on client machines from central server. the following is the code that i use:[code]where cleaners is a data source i have manually created in ODBC data sources.and then uses the connection for inserting,deleting and so on.can somebody help me with a code that can enable it access the remote machine.

View 1 Replies

Placing Multiple Pictureboxes To Different Location By Using Keypress Event?

Dec 19, 2011

I have this code. credits to jmchiney. My goal is when I press a certain key, the picturebox corresponding to that key should be moved to a certain location. Exactly like in the text twist game.

I have a code running and doing what I want but It is only applicable for single letter. For example the word alabama. all letters without duplicates are placed properly but for letter a, only one letter a is being accepted and moved. that goes for all letters.

Here is the

Dim pb As New PictureBox
Select Case (e.KeyChar)
Case CChar(letterPicbox1.Tag)

[Code].....

Another one. when a certain letter is already placed to the location I set and once I press again the same letter, the location changes. What I want is when I already gave pictureboxA a location and then I press "a" which correspond to pictureboxA again it should be stationary and check if there are other letter "a" in my pictureboxes and move the next detected letter "a" to the next position. Like i said. just like text twist game.

View 1 Replies

Cast A Reference To An Object To A Reference To An Object Of The Same Class?

Mar 17, 2012

The book "Beginning ASP .NET 4 in VB 2010" contains the following:NOTE: TaxableProduct inherits from Product.You can also cast in the reverse directionfor example, cast a Productreference to a TaxableProduct reference. The trick here is that this

View 2 Replies

Grand Central Dispatch For Visual Basic?

May 28, 2011

In Mac OS X I can take advantage of more than 1 core using GCD (Grand Central Dispatch). What is the equivalent for a Visual Basic program?

View 2 Replies

Using A Central Startup Routine To Initiate Several TCP Connections?

Jan 6, 2011

I'm using a central startup routine to initiate several TCP connections, start up a background thread that does some monitoring, and instantiate a group of objects that track information throughout the lifetime of a networking session.

There are periodically server-side problems with the protocol I'm working with, at which point the whole mess has to be torn down and set back up, so at the front end of the startup routine I'm disposing of instantiated tracking objects, killing the monitoring thread, and disconnect/close the existing sockets (if they're already set up). At that point the sockets may be in the middle of an asynchronous send or receive operation, which is causing system exceptions when the socket is torn down and then the asynchronous delegate gets called and EndSend or EndReceive thinks there isn't an object there anymore.

I had assumed .Disconnect and .Close would take care of these async processes, and I'm a little lost. Is there some one-shot method I can use to abort those async operations before I tear the sockets down to re-instantiate them?It never hurts to try. In a worst case scenario, you'll learn from it.

View 10 Replies

VS 2008 - Central Game Server / Clients

Jun 25, 2010

I've got a game I would like to build, it will require a central game server where peoples data (game data :-)) will be sent to and shared with other players - how is the done. Is it remoting? TCP? something else - I need to study up on it but want to make sure I'm learning the right thing.

View 3 Replies

Copy Byte Array To Memory Location Of A Instance Of A Class?

May 25, 2012

I am trying to copy a byte array into a Class that is in a third party library

Dim usr As New RSI_USER_RECORD Dim ba(RSI_USER_RECORD.RSI_LEN_USER_REC - 1) As Byte 'populate ba here usr = ba 'how can I do this? Is this even possible?

Here is the definition of the class (from Reflector)

[Code]...

View 2 Replies

Store In A Central Place Where The Numbers And The Message Will Be Stored?

Jan 22, 2010

I need some help with to make a messages system. I build a form with display a message code and the message.

Example : 0000001 : Not connected to network

The problem is that i want to store in a central place where the numbers and the message will be stored in the code. I was thinking about a array to store the date.

View 3 Replies

VS 2008 App For Sync Files On Client With Central Computer (VPN)

Jun 22, 2009

This is the situation: i have the central location with the main computer,and 14 distanced locations connected in VPN and often we need to update program manually (on distanced locations) by overwriting the existing .dll-s of the program and this is pain in the ass to connect remotely to 14 locations and on each workstation overwrite the .dll files so i want to create application which is going to be installed on each WS and by running this app it will check the program folder on central computer and if there is any file with newer version then existing one on the WS it will copy it from central computer and overwrite the old file/s on WS. It is a small app with two buttons and progress bar but the main thing is the Update now button because i dont�t know which commands it should commit.

View 22 Replies

VS 2008 How To Reference A Specific Icon Location In A Icon Collection In A Dll

Jul 28, 2009

I'm not sure exactly if the folder icon is in shell32.dll, but nonetheless if it is.Basically, whenever I come across a folder in a FileSystem list, I want to add the icon for a folder to the image list that I am using for the ListView. The problem is that I'm not sure how to reference a specific icon location in a icon collection in a dll.Is this possible with Icon.ExtractAssociatedIcon and shell32.dll?

View 14 Replies

Add A Class As A Reference In Another Project?

Sep 15, 2009

how can I add a class of a different project to my current project as a reference?I tried Right click_-> add existing item --> ( The class from the other project) then it gives me error.I am not sure how can I use that class as my reference to my current project?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved