Located Files Locally?
Jul 1, 2010
Well whenever I reference a file I have been doing so using the full C://location/here kinda way, but my next program will be on CD so I need to figure a way to locate files that will be on the CD drive.In other languages I have used, %A_ScriptDir% and then go from there, is there something similar in vb?
View 10 Replies
ADVERTISEMENT
Apr 19, 2012
I will have people send me (a zipped archive of) an entire VB project and when I try to open it, I get a message that "The system cannot find the file specified" for one or more files. I have had them bring their laptop with the project on it, and it runs, but when I search the folder, I only see the files they sent me. Apparently sometimes files get stored (or moved) elsewhere and their system will track the locations, so their computer can find the files??? Really not sure how or why this is happening.Is there any way to have VB report where all the files in a project are actually located? There are so many files and so many folders in even a simple VB.net project that trying to track these down myself is very frustrating.
View 1 Replies
Feb 5, 2012
I will have people send me (a zipped archive of) an entire VB project and when I try to open it, I get a message that "The system cannot find the file specified" for one or more files. I have had them bring their laptop with the project on it, and it runs, but when I search the folder, I only see the files they sent me. Apparently sometimes files get stored (or moved) elsewhere and their system will track the locations, so their computer can find the files?Is there any way to have VB report where all the files in a project are actually located? There are so many files and so many folders in even a simple VB.net project that trying to track these down myself is very frustrating.
View 13 Replies
Dec 28, 2011
I have two MS Reports with each their own dataset.The first one works but the other does not fill anything in it's table. When I debug the dataset, just before showing the Report, it's fill, and I did the same setup as with the first report.I get no errors og other input.. The table just not show any rows at all. Is their any log files that can tell me something and if so, where can I find them?
View 2 Replies
Apr 1, 2012
I have default.aspx used masterpage, in master page i have a control called DefaultMenuContent, this control have a dropdownlist with autopostback, the problem is loosing the selection even if i use Is Not PostBack in control's load event, how to persist the dropdownlist selection?
In Master:
<asp:ContentPlaceHolder ID="MenuContentPlaceHolder" runat="server">
<art:DefaultArabicMenu ID="DefaultMenuContent" runat="server" />
</asp:ContentPlaceHolder>
[code]....
View 1 Replies
Feb 13, 2011
In my application I play sound files that are located in a folder on my computer's desktop.
Const sSoundFolder = "C:UsersChrisDesktopSound"
Now that I'm ready to deploy my app, I want to reference all the audio files so others can hear them in the application.
I read how to reference them... but what I don't know:
Do I have to change the above code to some sort of reference folder in my application instead of my desktop?
View 3 Replies
Aug 14, 2010
Question: When you have a .NET GUID for inserting in a database, it's structure is like this:
60 bits of timestamp,
48 bits of computer identifier,
14 bits of uniquifier, and
6 bits are fixed,
128 bits total Now I have problem with a GUID, because it's a 128 bit number, and some of the DBs I'm using only support 64 bit numbers. Now I don't want to solve the dilemma by using an autoincrement bigint value, since I want to be able to do offline replication.
[Code]...
View 3 Replies
Nov 15, 2011
I a function belows which is being used to preview an image but that involves saving the image locally in my drive. I am using this feature in an data entry form which means if the user discards the form, I have to delete the image which I feel is not efficient. How can I go about previewing the image and only save it locally if the user saves the form.
Protected Sub save_btn_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_Save.Click
If uifuVouTypeUploadfile.PostedFile IsNot Nothing Then
[Code]....
View 1 Replies
Jan 29, 2011
How to connect locally on server machine?
View 1 Replies
Sep 10, 2010
I created a program in MS Visual Web Developer 2010. It has a form that simply launches a script that manipulates a database. The project lives in several files and they are all inherited so they see each other and it accesses a MSSQL Express DB on one of our servers.
When I F5-Run the project locally on my PC it works fabulously. When I copy it to a web-enabled (application) folder on the server it executes but almost my very first line of code fails with this error[code]...
View 1 Replies
Jul 31, 2011
I'm looking for the best way to locally save settings to an application.I want the settings to "attach" themselves to the executable of the application so that I can send the application to another PC and still have the settings.The purpose of this is for a server that is going to issue an executable to anyone who requests it, the server sends an executable with the callback settings hardcoded into the application (for example IP, port and other settings) so that the application can connect to the server.I can't hardcode the settings in the source code because the application is going to be issued by different servers which of course, will need a different connection setting.I also don't want the settings to be stored on a file or any other "external" resource since then, the settings could be changed which could open security holes to exploit the application.So what I want to do: I want an executable to have some settings attached which will be set by another application. How can I set the settings of one application with another? And how can I efficiently save the settings internally on an application and then copy the file to another PC while still having the settings?
View 6 Replies
Apr 27, 2011
I have an application that authenticates against a third party web service by sending a username and password. At the moment I'm typing the password on a winform each time I start the application - but I need it to login automatically.
I'd like to store the username/password somewhat more securely than
Dim username as String = "username"
Dim password as String = "password"
I understand that I probably won't stop a determined hacker with access to my source code, but storing them as plaintext feels wrong. I've found some similar questions on here but none that provide me with an answer I can use.
Edit: The web service isn't mine, it's an API that requires me to login to use.
View 1 Replies
Apr 3, 2009
I have an application that runs just fine if I execute it from a local drive, however when I deploy the files to a network location and run the file I get a "Common Language Runtime Debugging Serivces - Application has generated an exception that could not be handled process id bla bla bla, OK to terminate, Cancel to debug"
View 3 Replies
Apr 21, 2010
My desktop application is developed in VB.Net and can be run through two types of users, one who install it on their local machine and execute locally.
Second type of users will run the application remotely from the server.i.e. Application will install on the server and user will execute that application from client side. Server can be a Citrix Meta Frame or any server accessed through Remote Desktop Connection. I want to maintain single exe for both types of users.
Is there any mechanism/way through which I can come to know programmatically whether application is running locally or remotely?
View 8 Replies
May 17, 2009
I have two main troubles. The most important is the telnet one. I have another program which sends data via telnet locally on the PC. It requires a login and optional pass. I can connect and draw data which comes in 77 byte packets.
The problem is, the first packet of data doesn't display until the 2nd one comes in, which for this arrangement could 10s or 24 hours depending on the final user's intended use. This staggered data rx continues until termination of the program. I've used tcpClient.Available() to confirm that my app is seeing the data almost the instant it leaves the other program but for some reason the message isn't passed until the 2nd packet arrives. I'm sure I've probably implemented this in a most cumbersome way so any streamlining.
The second issue (which is contributing in part to the first) is the timer which here uses a freeby snip from a forum somewhere - it screws with the app's menu's controls and program flow. I've tried the VB2008 timer but can't seem to make sense of the best way to use it in this context. I think I've been looking at the screen too long and can't see the obvious.
Imports System.Net
Imports System.Net.Sockets
Public Class Form1
[CODE]...
View 1 Replies
Apr 21, 2010
My desktop application is developed in VB.Net and can be run through two types of users, one who install it on their local machine and execute locally.
Second type of users will run the application remotely from the server.i.e. Application will install on the server and user will execute that application from client side. Server can be a Citrix Meta Frame or any server accessed through Remote Desktop Connection.
I want to maintain single exe for both types of users.
Question:
Is there any mechanism/way through which I can come to know programmatically whether application is running locally or remotely?
View 13 Replies
Jun 1, 2011
<p>I cannot for the life of me figure out why the below code works when I fire it from my localhost but does not work when I publish it. I am unable to remote Debug </p><p>but it seems that I am getting Error 2250... I've tried searching for it but its too damned generic a code?</p><p> </p><p>All I want is the UNC, why is everything in .NEt so damned difficult?
View 6 Replies
May 16, 2012
I am creating html code as a string (named htmlString) in a Visual Basic .Net program and want to show the created html as a new page
Dim path As String = Server.MapPath("~/tmp/")
Dim strWriter As StreamWriter = New IO.StreamWriter(path & "SomeHtml.html")
strWriter.Write(htmlString)
strWriter.Close()
System.Diagnostics.Process.Start(path & "SomeHtml.html")
This works locally but when published on the server it does not open the html page. (Nothing happens when I click on the button that is supposed to trigger the piece of code to create .html and display it.
View 1 Replies
Aug 31, 2010
I'm looking for a method of generating unique identifiers for a record class being created locally and then persisted in various formats (XML, SQL, etc.) I've seen people using DateTime and GetHashCode, but that seems to lend itself to duplicate identifiers depending upon the sample size. GUID is a bit overkill, as I don't need anything that unique (large) at the global level. I'm also aware of using GUIDs and GetHashCode to get the size down a bit, but duplicates tend to crop up here as well. Any best practice or method for generating simple unique identifiers?
View 3 Replies
Sep 14, 2009
Can I use vb (API or the framework) to tell if the user is logged in locally or with terminal services / remote desktop.
View 2 Replies
Feb 1, 2010
I am currently developing an application that will require each end user to specify a rather large set of tabular data specific to his/her own preferences. Each time the user starts the application, it will load this set of data.
what is the best way to store this data locally on the end user's local machine? Should I use XML, Access mdb, flat text files?
View 2 Replies
Nov 3, 2010
I'm having to store a user account locally on a machine, what would be the best method to store this? (Needs to be reversable encryption rather than hash)I'm accessing a UNC share as mentioned here: url...Can anyone suggest a better method or changes to the above to secure the credentials as much as possible?
View 1 Replies
Mar 15, 2012
The code works fine when I run it locally, yet as soon as I have uploaded to our dev server it doesnt run, but also doesnt error.I did some research and found that I should have the thread impersonate the WindowsIdentity, which I have done but still the thread does not work, I also tried increasing the max threads in IIS and still nothing.Im running IIS 7.5 on Windows 2008 R2.The method being executed on a new thread is in a class in the App_Code folder and looks like:
Public Class RosterEmailer
Inherits System.Web.UI.Page
Dim thisID As String
Dim thisName As String
[code]....
View 2 Replies
Apr 18, 2011
I'm using System.Management.ManagementScope to connect to a remote computer and install an MSI package. This works great if the MSI is located on the remote computer, but it fails if I try to use a network location to run the MSI from. The UNC path is correct because if I manually type it from the remote computer it runs fine. There must be a limitation (security I'm thinking) that prevents things from running via WMI if the exe isn't local to the remote machine.My last hope will be to copy the MSI from the network location, store it locally on the remote computer, then run it - but I'd really rather not have to do that.
View 3 Replies
Oct 6, 2011
I am writing a program for a class and it needs to read/write to an Access 2007 database. Right now I am referring to it's absolute path when I use it in connection strings, something like:
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:UsersMeDocumentsVisual StudioProjectsProject1Database.accdb")
This is going to be a problem when I turn it in obviously, because the professor isn't going to have the same path. So I want to somehow include it into my project and then refer to it with a relative path or something so that it will work on his machine. When I imported it through the Data Sources it had an option at the end to copy the database into the project which I agreed to. It put the Database where all of the source files are on my computer, so I tried using Application.StartupPath(
View 1 Replies
Aug 26, 2010
How can I printscreen my screen that can be saved in gif or jpeg format locally in VB.net
View 1 Replies
Mar 29, 2010
I am creating a VB.NET application for a Calculus class as a little side-project. It requires user profiles that are saved locally in the program's main files. I am using 2 separate classes to access the user profiles right now.
The first class is called Config and it is used to manipulate the basic config file which contains lesson document paths, settings, and user profile names.
The second class is called User and it is used to load up user profiles from a profile directory where user data is saved in separate text files.
The Config class retrieves the user names, and user profile text file paths. This text file path is then handed off to a User object that can then load up and interpret the file.
how should I format the config file and user files so they are secure enough that someone can not easily retrieve or manipulate data?
Here is a sample of how I am reading the text files:
Dim userList() As String = {Nothing}
If My.Computer.FileSystem.FileExists(configPath + "config.cfg") Then
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(configPath + "config.cfg")
[Code]....
The problem isn't reading the text file, I am just not sure how to make it secure. I was thinking about first parsing the entire file to translate it from 'encrypted' to text, and then save it as a temporary file which I would pass off to the above code, then delete the file immediately afterward. As for 'encrypting' (is that the right word for this?) the file, I could maybe bit-shift each character using a key that I would save at the beginning of the file.
View 2 Replies
Jun 10, 2009
how I can get the WebBrowser1 control to display an HTML file stored locally on disk when it launches, similar to a homepage. My attempts have all resulted in failure. I am currently trying the following:
[Code]...
If you need me to supply more information, I am happy to do so.
View 22 Replies
Dec 7, 2011
In my vb.net winforms application using Visual Studio 2010, I'm trying to work something out and my brain just isn't working today. I'm rewriting this application to make it more efficient and trying to minimize the sql calls.
Currently it works like this.User logs in to the app, it loads the main form, where the user can open up different forms to access different client data. Each time a record is loaded in one of these new forms it also loads that specific users permissions from a Sql Server 2005 table.
What I want to do is when my main form loads after the user logs in, is load a public dataset or datatable, or any other suggestion, storing that users permissions so I can access them locally without hitting the sql server every time the user opens a client record.
View 4 Replies
Mar 6, 2009
I am trying to get a subset of locally declared methods in a webform code behind using GetMethods but cannot figure out the proper BindingFlags settings (see code below)....and some further specific questions:
1) Is it possible to differentiate between Procedures and Functions?
2) Furthermore, I only want to fetch a certain subset of these....is there some way I can decorate the ones I want with an attribute, and then further filter based on that?
Private Sub LoadFunctions()
Dim thisClass As Type = Me.GetType
For Each method As MethodInfo In thisClass.GetMethods(BindingFlags.Instance Or BindingFlags.Public Or BindingFlags.DeclaredOnly)
[code]....
View 1 Replies