|
Using VS2005 RC1, every time I create a project and add a reference to a DLL or control that resides on a different drive I get the following error either when attemting to run the program or when I first attempt to add the reference:
... Could not load file or assembly ... Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
I'm an administrator-equivalent user and have full create/modify/destroy on both my local drives and all network volumes. This seems to be the case when I create the project on my local C: drive and attempt to add a reference to something on a network mapped drive and when I create the project on a network drive and attempt to add a reference to a DLL on my C:. I've made sure the "Copy Local" setting is TRUE on the reference so I'm clueless as to what is triggering the exception.
For example, I can create a project on my local drive, add a ref. to a DLL that's IN my project folder and run it, no problem. The DLL has no dependancies other than .NET runtime. I then copy the entire project folder up to the network and load it (no errors) run it and it dies trying to create the form with the error above (the form refecences the DLL to create a new object).
I've google'd both the error code and text and haven't found anything on MSDN/MSDN2 or anywhere else that explains this (at least in any terms an old VB programmer such as myself can understand). Can anyone enlighten me as to what the heck causes this, and more to the point, how it can be avoided in the first place?
Thanks!
|
|
|
|
|
I need help on functions using vb.net i'm doing a little prog on sorting this is for my vb.net. i need to create a function that holds the highest integer out of 3 and another function that holds the lowest integer out of 3. Can some one please help me
|
|
|
|
|
If that is all you need your function to do, then you can add a function procedure to any form or module:
Public Function MaxThree(byval Int1 as integer, byval Int2 as integer, byval Int3 as integer) as integer
If Int1 > Int2 then
if Int1 > Int3 then
MaxThree = Int1
Exit Function
End If
End If
If Int2 > Int3 Then
.....
End Function
This is an incomplete, very basic, example but I think you should get the idea from here.
|
|
|
|
|
try this:
lowestValue = Math.Min(Math.Min(value1,value2),value3)
and
highestValue = Math.Max(Math.Max(value1,value2),value3)
Thanks,
Karen
Nooobie to OOP and VB.Net 2005
|
|
|
|
|
Hi,
I have this problem of adding dates in a combobox say in this format dd/mm/yyyy please help me out!
|
|
|
|
|
Which version of VB are you using?
|
|
|
|
|
|
The following example will add the last 20 days to your ComboBox:
'Create a variable of type Date
Dim dt As Date
Private Sub Form1_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.Load
'Set the start date to 20 days ago
dt = Date.Now.AddDays(-20)
'Loop and add each date until it reaches today
Do While Not dt > Date.Now
'Increment the dates
dt = dt.AddDays(1)
'And add the dates to the ComboBox
cmbDate.Items.Add(dt.Date.ToShortDateString)
Loop
End Sub
I hope that helps.
(although having never used it, I am not 100% sure it will work in version 2002)
-- modified at 13:46 Sunday 23rd October, 2005
|
|
|
|
|
ListBox1.Items.Add(Format(Now.Date, "dd/MM/yyyy"))
|
|
|
|
|
Am I committing a major sin by asking a question here regarding VB6?
If so, please be gentle with me!
Using VB6, how do you determine the mac address of a network card?
db
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
|
hey guys Can we do the same through vb.net
if yes tell me also
abhinav
|
|
|
|
|
I have some javascript that detects a certain mimetype that is installed and it all works great in firefox and netscape but doesnt in IE is there any vbscript that will do the same but in IE
<script><br />
<br />
<br />
if (navigator.mimeTypes["video/psiv"]) { <br />
document.write("You have Already installed the plugin continue to next page!");<br />
window.location = "installed.html"<br />
<br />
}<br />
else { <br />
document.write("You need to install the plugin continue to next page!");<br />
window.location = "download.html"<br />
<br />
}<br />
<br />
</script>
|
|
|
|
|
hi,
i'm trying to store values from database into an array using datareader,
but i'm getting this exception:
system.NullRefernceException:Object Reference not set to an instance of an object
please help me
|
|
|
|
|
Post some code. Where in your code does it break. Which object is not initialized? That is where you will find the problem.
|
|
|
|
|
thanq for ur response
i got this,
problem is that my array was not initialized properly
now i got this.
now i've another problem ..
i posted this problem,its subject is "HOW TO ADD Values TO DATAGRID"
this is regarding adding data to already existing data in a datagrid
please try this
thanks in advance
|
|
|
|
|
I am trying to get the domain name from a client PC of the domain it is connected to.
"company.com.au"
Most code I find gets the domain name but not the full domain.
Any ideas would be great...
Thanks...
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
What "connected to" are you refering to? Are you asking how to get the DNS suffix from the TCP/IP properties? A Windows domain? An Active Directory domain? ...?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I would like to get the AD domain string'
DC=company,DC=com,DC=au
Having trouble getting this so was hoping to get the
company.com.au and use string replace the "." with "DC="
Hope this makes sense...
I can pull from the reg on the DC but not on a client...
Thanks
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Couldn't you just lookup the machine name to get it's AD object, then look at that object's Parent property?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I guess someone could but I don't know what you are talking about...'
I am a newby if you have an example that would be great...
Thanks
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Since you were talkinga bout AD paths and stuff, I just assumed you knew what AD was all about. Without the basic knowledge of AD, you'll find this to be a difficult project to do. I would suggest starting the crash course here[^]. Yes, there are examples of how to search. Of course, they all assume you know the basics of AD.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Read this and looked at the examples like this one below but all have the ("LDAP://Path") but this I don't know how to get via code. I know AD and how to find the path but the program I am writing is for users that do not.
If this if to hard to do without a knowledge of AD I will pull in the full domain or DNS sufix and build a string from it replaceing the "." with "DC=" but this is not the best way to do it am I was looking to see if there was code that would pull in the root AD DC=companyDC=comDC=au.
Below is am example from the link you sent me...
To search an Active Directory hierarchy
Create an instance of the DirectorySearcher object and initialize it to the DirectoryEntry value that you want to search. Create an instance of the SearcherResultsEntry object.
Set the Filter property of the DirectorySearcher object to the value that you want to search for.
Initialize the search by calling the FindAll method of the DirectorySearcher. The DirectorySearcher object will return a collection of all objects in the target directory whose values match those specified in its Filter property.
The following example searches a directory for the user name "John" and then iterates through the returned collection, writing each object's path to a console. Note that this example will not search subdirectories.
' Visual Basic
Dim entry As New DirectoryServices.DirectoryEntry("LDAP://Path")
Dim mySearcher As New System.DirectoryServices.DirectorySearcher(entry)
Dim result As System.DirectoryServices.SearchResult
mySearcher.Filter = ("(anr= John)")
For Each result In mySearcher.FindAll()
Console.WriteLine(result.GetDirectoryEntry().Path)
Next
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Memory leakage has been viewed when visiting Accsess Database through ADO under VB. When opening a Recordset with a large number of records,the amount of memory consumed by the VB application will rise up,as well as the "total memory-used" indicated by the "Task Manager" in its status bar. But when the VB application finishs using the Recordset and colse the Recordset,then set the variable to Nothing, the amount of memory consumed by the VB application will go down to its normal level gradually,while the "total memory-used" show by the "Task Manager" in its status bar will not decrease,even over a long time, untill the VB appliction exits,the "total memory-used" will suddenly decrease.
Then what causes such a problem? how to resolve it?
thank you.
qiyue
yue_qi_qi@sohu.com
2005-10-21
|
|
|
|
|
You're looking in the wrong place to see what memory is being used by your application. In Task Manager, you're seeing what memory has been RESERVED for the entire .NET Framework and it's virtual machine that runs your application, otherwise known as the CLR (Common Language Runtime). Some of this memory is not permanently allocated to your "application", but is reserved for future use. This means that if Windows wants some of that memory back, the .NET CLR Memory Manager will release whatever Windows wants back to the system.
The .NET CLR Memory Manager keeps the memory reserved for performance reasons. Since you've used a large chunk of memory before, you might need it again, so the Manager hangs on to it, even though your application hasn't allocated it again. Since it's a little time consuming to allocate memory from the system (adding it to the .NET managed memory heap), then allocate your managed object on that heap, the .NET Memory Manager will try to skip the first step, if at all possible, by reserving memory for future use.
If Windows needs the memory back for something else, the .NET CLR Memory Manager is more than happy to free up whatever Windows needs. If you want to see the real memory counters, open up Performance Monitor and use the memory counters under the .NET CLR Memory performance object.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|