Modify Class For Permissions Determination, Which Fails To Execute A System.web Statement
May 1, 2009
I have found the class code below which should be activated to show the result for the selected option
Dim pc as new CheckPerm
pc.Permission = "Modify"
if pc.CheckPerm("C:WIndowsSystem32") then
[Code].....
View 1 Replies
ADVERTISEMENT
Feb 6, 2011
Office 2010; Windows7; Visual Studio Basic 2008 (VB.Net)
[Code]...
The following strSQL string is not working as expected when run in VB.Net Interop to Access: (NOTE: The line-feeds " _" are used below are for reading only - are not in actual code line)
[Code]...
View 14 Replies
Jun 13, 2010
i am working on an application called logonscreenchangerxp i made my program and when i run it on xp virtualmachine i get errors the program is made using vb 2008 and using .net framework 2.0 i am not able to get full permissions to modify boot.ini file and a regisrty value and to delete a file
View 5 Replies
Sep 10, 2010
I'm building a dynamic query in my ASP.NET MVC project by the following: [code]Where basically the strWhere is a string that I build up a dynamic filter depending on what the user selects to search on.This works great until I need to add a date comparison to the date clause.[code]Which will end up as:"SELECT VALUE userInfos FROM MyDBEntities.UserInformations AS userInfos Where userInfos.BirthDate <= 10/09/1992"..But when i try to execute the query with the ToList whenever a date is in the where string i get the following error:The argument types 'Edm.DateTime' and 'Edm.Int32' are incompatible for this operation. Near WHERE predicate, line 1, column 103.
View 2 Replies
Mar 24, 2009
I have a series of DML and DDL(Drop View only) statements that I need to execute under single transaction from VB.net app. I m using commandObj, and kept above all I kept beginTransaction statement. Everything is working fine expect when error is returned by Drop statement. If Drop statement returns error then whole transaction is rolledback. I do not want tthis. I want to continue even if Drop fails keeping the other DML statements that were executed before Drop.
View 5 Replies
Mar 28, 2012
I wish to populate a datagrid from a data source using parameters specified by the user. I have successfully achieved this by using the TableAdapter.Fill method with VB in VS 2010 Express. However, the potential permutation of parameters is becoming too large to have a separate Fill method for every possible combination. Ideally I would like to construct the SQL SELECT statement at run time to reflect the user's options. Can the Fill select command be set at run time, and if so, how? I only need to build the WHERE clause, and the query is read only.
View 5 Replies
Nov 9, 2009
i am getting the error "System.security.permissions.securitypermission" when running the VB application in another machine. i have put the .exe file in the common path and i ran it my machine and it is working fine, but when i tried to run it in the different machine i am getting the error. Can anyone help me out in fixing this error.
View 1 Replies
Aug 6, 2011
I am building a permissions system in vb.net against the normal Windows Server file system. Have not decided on the best method, but is there a way to get access to some kind of internal GUID that Windows might store for a folder. If I just store the path for security, then it quickly becomes very hard to update a database storing path information to get security information. If a folder had some kind of internal GUID structure that would be great. Is this available?
View 1 Replies
Feb 13, 2011
I am new to VisualBasic and trying to learn it online. For my first assignment I have to make a program that allows someone to input a time in AM/PM and select the time zone and automatically output a picture and three other time zones. I think I have it for the most part but I am having an issue with one part in particular. Since the time is input using AM or PM if the original time is 11:00 AM and I add an hour it should switch to PM. But I'm not quite sure what I'm doing wrong. I basically need to say If the time is equal to 12 and the meridiem is equal to am then it should switch to pm but I keep getting errors inidicating they are trying to switch to a boolean value.
[Code]...
View 1 Replies
Jun 17, 2009
I want the asp application to create a folder that has access only to the account the application was running with (i.e. asp account?)
I actually wanna use this one, but I don't know how to use the "ComputerCurrentAccount" dynamically.
I want to get the current working account.
View 1 Replies
Jul 8, 2010
I'm working with a vb.net 2005 project that i converted from vb 6.0 last year. It's working fine in windows xp, but on vista and windows 7 i get an error saying 'Insufficient security permissions to set the system time.' Can you think of any way to replicate this error on windows xp? I'm trying to get a windows 7 box setup at work but I was wondering if there was anything I could try with xp in the meantime.
View 9 Replies
Jul 27, 2010
I am getting the following error message when I try to call this program from a shared drive on our network;
System.Security.SecurityException: System.Security.Permissions.SecurityPermission
at EMAILVB.EmialVB.EmailVB_Load(Object sender, EventArgs e)
[code]....
View 5 Replies
May 23, 2011
Lets just say we have this as Command1 Dim Command1 = "whoami.exe >> C:Hello.Txt" The program will read a list of users from a text file and then perform the action on each of them. If the user does not exist, or they are part of a password protected computer, I would like to see that in my printout. I have this but am Unsure how to write the If Then Statement (If that is the ebst route to take)
[Code]...
View 2 Replies
Feb 5, 2010
I've made heavy use of the convenient My.Settings feature but sometimes I run into problems using it.
View 2 Replies
Apr 15, 2011
I have the following function
Public Function GetPositionBySchoolID(ByVal SchoolID As Integer) As CPAPositionsDataTable
Dim positions As New CPAPositionsDataTable
[Code]....
And I was wondering if there is any way to cut out assigning the LINQ result to tmp and just work with the result directly, i.e.
Public Function GetPositionBySchoolID(ByVal SchoolID As Integer) As CPAPositionsDataTable
Dim positions As New CPAPositionsDataTable
[Code].....
View 2 Replies
Aug 16, 2010
I want to execute an SQL statement and put the result in to a data table.
Sub getvehicletypes()
Dim dt As New DataTable
Dim intLine As Integer = 0
[Code].....
Once Ive got it in a dataset I need to work out how to search the dataset for a code and return the corresponding description and vice versa
View 10 Replies
May 11, 2011
I have a windows application. I would like to run a statement while exiting my application. I tried adding my statement on FormClosing event. but it only executes if the application is closed properly. However, If the application is closed via task manager or system is restarted or logged out, etc. then the statement in closing or disposed event is not getting executed.
Private Sub Form1_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed
MsgBox("disposed") End Sub Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles Me.FormClosing
MsgBox("closing")
End Sub
can some one tell me how to get my statement executed even the user tries to log out or shut down or application is closed via task manger.
View 1 Replies
Jan 29, 2010
I was rooting around in one of our company apps which is done in VB.net. I'm not familiar with VB.net (I do stuff in C#) so I'm asking this question: Does the code after the clean up comment execute? [code]It is my understanding once you say return, you give the calling function control again.
View 6 Replies
Jun 6, 2010
I have coded up a service, and I would like it to monitor when a user logon to the system fails. Is there an event I can handle for this? Or, a message that is broadcast? Or, is it possible to get the failed logon counter for the local system?
View 4 Replies
May 29, 2009
I get the following error:Application-defined or object-defined error.From what I can understand, it's when I attempt to attach a file to the email, I get that error. What I noticed is that it's because the file is in use.Is there anyway to attach the file anyway? My users are simply not closing their files after saving, right now I'm using computer manager to kick them out. The process is for them to save a file on a server through a share and then I pick that up and send it. Works fine as long as they close the file after save.
View 7 Replies
Jun 8, 2012
Referencing an object (class) within a thread fails
I have an object ("a vb class") that needs to run on a separate thread and communicate with the U/I.
Even using sample code, I cannot get the object to run within a thread. I demonstrate this problem with two examples. The first calls a function within the form and it works perfectly. The second creates an object and performs the same calls, but fails.
example #1 [working] (Called within a form)
Private Delegate Sub FuctionToBeRunInThreadDelegate
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
[Code]....
SUMMARY: When the thread creates the object, it appears that the object is not actually running inside of a thread or else form.InvokeRequired would be true. I have other more complex examples where this is strongly verified and evidenced, but I provided these two as a very simple demonstration of my problem.How can I have a thread "own" a series of individual objects so that the objects are run asynchronously and can independently report back to the U/I?
View 1 Replies
Jan 25, 2012
It seems like a lot of people are having trouble with this piece of the control toolkit.I've looked for a few days on the internet for an answer and haven't been able to find one. Best solution I've seen so far is "write your own reordering procedure" which I don't want to do.
<asp:ScriptManager ID="smgrJobBidding" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="uPanelReorderList" runat="server"
[code].....
View 1 Replies
Nov 13, 2009
Enviro: 2007 Exchange Server, 2 Intranet servers (1 deploy, 1 dev) running .NET 2.0 app - all within same network / behind firewall. I am working on a legacy app by our previous web guy, when our sysadmin upgraded to exchange 2007 and put it on a new server all of the mail functions in old app broke. Had to upgrade to .NET 2.0 (from 1.x) and nothing worked untill I tried new SMTP code in a local function in the codebehind of a page of the app instead of calling a class, as follows:
Function SendNow(ByVal strFrom As String, ByVal strTo As String, ByVal strSubject As String, ByVal strBody As String) As Object
Dim msg As New MailMessage()
Dim smtp As SmtpClient
[code]....
So the above works fine, in that file. The problem is that the app was designed to call a class that resides on the dev server. When I move this same code into the class on the dev server I get transport errors. I think this has to do with the fact that we're using integrated authentication with impersonation=true and it seems to get dropped due to the class being on a different server (even though it's behind our firewall).
I could either try moving the classes to the production server or somehow keep the authentication in the class working through the hops. Either way I need to keep the class because it's referenced all over the place (in more than just this app). I am not that savvy in .NET and I cannot figure out where the setting is within the app that defines where the class is imported from. It just seems to be available no matter where the app is deployed. (Working files are on same server as classes, then publish the app to production server).
View 2 Replies
Mar 16, 2009
I have used timers in .Net for a long time now an never had this problem.Start timer to fire every 10 seconds that reads an object and updates the UI using a delegate.This works great until the form is minimized several times, then the timer thread seems to vanish.Anyone come across this before?
Obviously I can roll my own using a thread directly and sleeping it, however this seems like reinventing the wheel when a threading timer class exists already.
Code: Private Sub m_Tmr_Tick(ByVal state As Object)
[code].....
View 5 Replies
May 2, 2012
I Use a thread to send an email. I need write text in a label to let user know when email was send in a form of budgets.' Option Strict is off Function on class form.
Public Sub ChangeLblText(ByVal msg As String) ' LblIconos.modifiers = public (In form)
lblIconos.Text = msg
End Sub
Declarated class of new thread. (Global declared.)
Public TasksPresu As New TasksClassPresu()
An Icon of Form "Presupuestos" trigger the thread
Dim Thread1 As New System.Threading.Thread(AddressOf TasksPresu.TaskEmail)
Thread1.Start()
Class Trigged thread
[code]....
When run this make an error in this line: lbliconos.text = msg Error: "Illegal operation through threads. It had access to the control "lbliconos" from a thread other than that which was created"
View 1 Replies
May 1, 2012
I Use a thread to send an email. I need write text in a label to let user know when email was send in a form of budgets.
' Option Strict is off
Public Sub ChangeLblText(ByVal msg As String) ' LblIconos.modifiers = public (In form)
lblIconos.Text = msg
End Sub
[code]....
I tried Invoke metods, delegate functions and adress of form without work, may be i left something.
View 6 Replies
Sep 8, 2010
I wrote a custom assembly for SSRS that returns a jpeg for the background image in a textbox on the report.I followed all instructions on msdn in regards to security but i still receive the same error.
Below is my config information
<pre lang="x-xml"><PermissionSetclass="NamedPermissionSet"
version="1"
name="Barcode">
[code].....
View 6 Replies
May 25, 2010
I have a little vb.net script that will copy a file, set its attributes to Normal, update the file time, and then set back the attributes to match those of the source file.
If IO.File.Exists(Destination) Then IO.File.SetAttributes(Destination, IO.FileAttributes.Normal)
IO.File.Copy(Source, Destination, True)
IO.File.SetAttributes(Destination, IO.FileAttributes.Normal)
[code]....
I however I'm encountering a quite strange problem. On some configurations, IO.File.SetLastWriteTimeUtc triggers an UnauthorizedAccess error, although the IO.File.Copy instruction worked very well.
View 1 Replies
Apr 30, 2009
How do I execute "Button1_Click" when click "Button2" like "Button1.Click(######)"? When I try to write Button1.Click() then that keep asking me "sender As System.Object,e As System.EventArgs". What value that I have to have "sender As System.Object, e As System.EventArgs"
[Code]...
View 2 Replies
Aug 30, 2011
I have an desktop application that references several dlls. All are targeted for .Net 3.5, x86. The applicaiton has been deployed for several years and was upgraded from visual studion 2008 to 2010 last year. I have made several changes to the app since then (as recently as last Thursday) with out any issues. Now, everything builds, but when I run the application, I get a type initialiazer error when one of the projects is loaded by the main application.
The error messsage is {"Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.":"System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}.
There were no changes to this project since the last successfuly deployment last week, but today I am getting this error.
View 14 Replies