Accessing DNS And MWA Objects Programmatically On A Child Domain
Feb 8, 2010
I've created managed code to programmatically provision websites on Windows 2008 servers from a Vista 64-bit workstation.The provisioning covers creating DNS entries, creating a file structure and a the IIS7 site (using Microsoft.Web.Administration aka MWA).I've had to do some DCOM configuration to get it to work through a firewall and it all works on the test server provided I'm in the same domain.I then cloned the Windows Server 2008 Virtual Machine (VM) that the provisioning does work on and then changed the clone's domain to the child domain in the forest where the production servers are sitting.The provisioning user credentials are synchronised on the parent and child domains.So the only change is moving domains and there is an automatically configured trust relationship between the domains.
Provisioning the file system still works on the server on the child domain, but managing DNS and IIS7 now have access issues.I've tried impersonating the Administrator on the child domain (and the thread identity is showing that works) and also had a go with CoInitializeSecurity (though I'm not sure that is appropriate for Win2008 and Vista)to no avail.What I really want to avoid is the need to have to store credentials separately on the workstation - it brings an unwelcome maintenance overhead and the possibility that if the provisioning user's password is changed, then the provisioning will unexpectedly fail on the production servers.Ideally once the provisioning user has logged onto the Vista Workstation, I'd like their credentials to pass through to the servers on the child domains (there are separate DNS and web servers) allowing them to manipulate whatever services (DNS, IIS7, file system) that are necessary.The solutions would seem to be something programmatic (whatever replaced CoInitializeSecurity?) or a Group Policy setting on the child domain may need altering to allow access.However being a humble software developer working out which of the myriad settings (one of the User Rights Assignments perhaps?) is outside my sphere of knowledge.The third alternative is to use Windows Communication Foundation (WCF) but I haven't done much with this yet and what I have indicates that this technology has its own security issues to accommodate.
View 5 Replies
ADVERTISEMENT
Jan 3, 2012
I have a nested class, let's call it class1 and it has class2 inside it; VB.Net eg:[code]
1) How can I define X number of Class2 objects[let's call it: Node(x) array]** with NEW() subroutine called?' this raises error: dim cls2(n) as new class2 end sub.
2) How can I return actual number of Node() array? [code]Outside my class in main project I define cls1 object:[code]Now an array of class2 is created inside cls1.
3) Now,How can I access All of them[node(x) array which is created inside cls1] with all properties and methods available?
I remember I wrote a ProcessManager class with this functionality in .net 2003, nearly 4 years age, I don't have the code now.
View 1 Replies
Jun 30, 2009
If a user navigates to my webpage how can I programmatically determine they are accessing my page from within the Intranet? (Not interested in NTLM or Windows forms authentication. Need a programmatic method.)
View 2 Replies
Nov 2, 2010
I have an FTP Server outside of the domain (In a workgroup). I need to move files using an application called by the FTP client on the FTP server to a share within the domain using VB.net:
(System.IO.File.Move(SourcePath & Filename, TargetPath & Filename))Impersonation will not work neither will mapping a drive (As no user will be logged on)This is a console application that takes the above parameters.
View 1 Replies
May 1, 2009
long story short, I have created a ListView type control, using UserControls for the parent control and the ListViewItems. Most the of the control is written and works fine, right up to the point where I tried to replicate the 'Control.SelectedItems(0).Index' property and the 'SelectedIndexChanged' event.
Each child object knows its index value, and could pass this value via the SelectedIndexChanged event (assuming this is how it works in a normal ListView control -- user clicks on an item, and that item fires an event updating the selected index value in the parent object).
How does the child object raise an event in the parent object? I have a feeling this could be done with Delegates, but I'm still learning about their usage.
View 1 Replies
Jan 20, 2010
I am able to find out when is the last time a user log into a domain but I am also wondering if it is possible to find out what's the machine's name or IP.
In my Active Directory, I see there is an attribute called logonWorkstation but it seems not being used (no value stored)
View 1 Replies
Mar 25, 2010
I am using visual studio 2008 coding asp.net.vb..I have 20 images on my site, the image holders being named picbox1 picbox2 picbox3 picbox20.I want to be able to address each picbox programmatically; pseudo code would look something like this [code]
View 2 Replies
Sep 7, 2010
In ASP.NET I have a form that has a Textbox named txtOutput and a button. In the main file.aspx.vb I can call a function from the button handler and in that function I can have [code]I have a bunch of functions in several other classes. For instance I have a class named AbleCommerce that does some database functions. These functions are called from my main class. In those functions, however, I have no visibility of txtOutput.All of my classes are, unfortunately, in the default namespace which I understand is not optimal but didn't seem to impact this issue.
View 2 Replies
Jan 9, 2010
Dont even know how to word this, reason I'm having so much trouble finding out the answer in help.But, basicly I'm trying to get data from many different text boxes named similar from my form, example:[code]where i would count up in a for and next statment from like 1 to what ever.
View 17 Replies
Apr 30, 2012
I have an MDI form which has got a dynamic menu based on various conditions. Clicking one of the menu items open up a child form, as well as changes the menu again specific to the child form. Now, when I close the child form, I should be able to change the menu back to the way it was before opening the child form.
I have the methods to add/remove the menu items under a menu head in the MDI form. What I tried to do is, in the child form_formclosing event call the methods to change back the menu items the way it was before opening the child form. Debugging through the code I can see the methods are getting called, the menu items are getting changed, however, after the form is closed, I see the same menu items which was there when the child form was open. I have no idea why!
Just to give you an idea about the project, its a very simple MDI form with a number of child forms, using Visual Studio 2010, VB.NET platform.
View 3 Replies
May 24, 2010
I need to dynamically access a bindingnavigator, is this possible? I basically want to have code in my Base form which enables or disables it's descendant's menu buttons depending on access rights.
View 2 Replies
Jan 28, 2011
I want to know the correct way to access an object that is stored as an object in another object...phew. Here is what I'm trying to do...
I'm creating a restaurant map and to keep things simple I have 3 classes -- cServer, cTable and cGuest. cTable has a property which should contain a cServer object eg
Public Property Server() As Object
'Called when the property is read
Get
[Code].....
View 2 Replies
Jan 31, 2011
I am trying to access a control (statusbar panel) on my MDI parent form from a child form.
Here's my
(located in child form)
Dim frmParent As frmMain
frmParent = DirectCast(Me.MdiParent, frmMain)
[Code]....
Object reference not set to an instance of an object.
View 4 Replies
Mar 3, 2009
OK - for starters - I'm not even sure that the title of this thread accurately describes what I want to do - but I had trouble verbalizing it. So I will give this a try: In my application, I have a custom object, call it myObject. In addition, I have another custom object called myObjectList which is basically a List(Of myObject).
Up until this point, all of the functions that I have been working with in my BLL and DAL have been shared - I haven't needed a specific instance of my object thus far. I currently need to write a function that finds a particular myObject within myObjectList and returns to me myObject. I know that the List(Of T) has a find method, but from what I have read so far - I don't think it is what I want (doesn't it return true or false? -and also, do I need an existing object to pass to it to see if it is in the list?)
[Code]...
View 5 Replies
Oct 31, 2010
I am trying to access objects created at run time.The following code works IF Options Strict is off. If it is on it indicates "Option Strict On disallows implicit conversions from 'System.Windows.Forms.Control' to 'System.Windows.Forms.TextBox'."
Option Strict Off
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim txt As TextBox = Me.Controls("T3")
[code]....
I am having trouble formulating the type conversion.A Second problem I am having occurs when I create a groupbox at runtime and then add the textboxes to the groupbox. I am having trouble drilling down to gain access to the textboxes inside the groupbox.
View 4 Replies
Feb 2, 2010
I have masterpage.master.vb where I have properties, such as;
Private _SQLerror As String
Public Property SQLerror() As String
Get
[Code]....
View 3 Replies
Jun 22, 2009
I need to migrate from Excel 2003 VBA to Excel 2007 VBA. When Microsoft introduced Excel 2007 it removed many objects from the previous versions and added some new objects. Also it hid some properties of particular objects. These hidden properties can be viewed by going to the object browser, right clicking any object and selecting "Show Hidden Members". My problem is I need to access these hidden properties. Is there any way I can access these properties. I can successfully migrate from Excel 2003 VBa to Excel 2007 VBA with the same functionality?
View 5 Replies
Jan 4, 2010
I've got a website and we just had a huge jump in traffic. Now all of the sudden we're getting sql parameter errors left and right. We switched to a new sql server a few weeks ago and everything has been fine but the added traffic seems to be breaking us.I have a data access class that is called when each user trys to logon. It runs through several tasks before finally updating the users last login date and forwarding them to the administration section.
What I'm seeing from the trace logs suggests that when I'm logging in the first several tasks are using my data (lets say user=birk pass=word). But at some point the accessor class starts sending over the data from someone else who's trying to login (lets say user=abcxyz).Every connection we make to the server is closed when we're finished with it. I'm nulling out all of the accessor objects when I'm finished with them. But somehow different user data from different sessions are making their way into other peoples instances of the object.
I'm not using session/application/cache/viewstate to store the objects so I'm not really seeing how they could edit eachother... Its just really weird and I'm not sure how to even go about researching the problem.This is roughly the accessor class... I trimmed out some of the parts that weren't reliant to the issue
Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.SqlClient[code]......
View 3 Replies
Oct 26, 2010
I am trying to change an objects location programmatically. I have the line: Trackbar1.Location.Y=100 but recieve the error: Expression is a value and therfore cannot be the target of an assignment. Does anyone know how to get around this?
View 2 Replies
Aug 11, 2009
I have what seems to be a simple problem for which I can't find a simple answer. I have an XML file something like this:
[Code]...
I would like to write a small visual basic .net 2008 snippet that will allow me to insert a new child node as the first node in the parent (or maybe insert it at any point within the parent) so that I now have
[Code]...
View 1 Replies
Nov 20, 2009
I am creating a tool that interfaces with an API for a CD/DVD burner. I have created several custom classes that will hold the information for the disk sets (which consist of a data path and a label file among other information. The DiskSet class has a list of Include objects. My proposed XML output would be something similar to the following:
<DiskSets>
<DiskSet>
<Name>MySet 1</Name>
[code].....
I am attempting to traverse the Includes collection (I have tried List and Binding List as I am also using this in a pair of datagridview controls) and it keeps returning Expression of type 'Object is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider." How can I use LINQ to pull a list of the Include objects under each DiskSet object for transformation into XML? I am hoping to keep this restricted to this one block of code if possible.
View 7 Replies
Sep 22, 2010
I have a function that works perfectly when I attempt to add a user from the same domain into a group of the same domain.
Function AddUserToGroup(ByVal strUserDN As String, ByVal strGroupDN As String, ByVal strGRPDC As String, ByVal strUserDC As String) As Boolean
Dim oUser As DirectoryEntry
[Code]....
The error is actually being thrown on the Invoke line, but as I said earlier, if the user is in the same domain, this works perfectly.
View 1 Replies
Dec 26, 2010
I have a Clients master object and then a number of child objects whose exact number is not known in advance such as Client-Contacts, Client-Payments etc, all of which have a one-to-many relationship with the Client master object.How do I define classes for such a scenario? Do I for instance create the master Clients class and can then I create an array of class somehow for child objects?
View 2 Replies
Feb 1, 2011
Is there any way to use a LINQ to XML to query an XML document like the one below to create new (anonymous or strongly typed) objects from the child elements of a descendant? Here is my XML document:
[Code]...
View 2 Replies
Oct 13, 2011
Basically I have the follwing:Dim ctx As New AdminCoreEntities Dim roles = (From r In ctx.Roles where r.Name.StartsWith("cust") Select r) 'list of System .Linq.IQueryable(Of AdminCoreModel.Role)
[code]...
The error i get when i run this is: Unable to cast object of type System.Data.Objects.ObjectQuery`1[AdminCoreModel.Role] to type AdminCoreModel.Role
Basically I have a many to many situation and I try to get all the Quicklinks objects queried by their roles and not quite sure why EF will cast to a single AdminCoreModel.Role when i.Roles is a collections of objects.
View 1 Replies
Nov 5, 2010
I am developing a new class which is a control that inherits from the "Panel" class. In this new class, I have three objects that are generated every time I create a new instance of the class. For simplicity, I will call this class "garage" and the three objects "BMW," "Lexus," and "Acura." So each new garage has three types of cars.
how can I share a variable from the Parent class with all of it's child objects? i.e. The garage has an array variable called "tires" which all three cars use. Rather than create each car object with the tires parameter, I would just like to keep the tires parameter in the parent class so that all my child objects can use it. I know that normally the parent class should provide the child class with all information when creating the child but it would seem redundant to pass the entire tires array each time since all three cars use the same tires and the tires object never change.
View 4 Replies
Feb 23, 2009
I coded a class that scans an object and maps data from a data table into each one of the corresponding properties, it works very well, however I am not able to set the property of one of the child (coplex objects)
Public Class CntrConfHdr
Private m_CntrConfHdrID As Double
Private m_HeaderCode As String
[Code]...
I want to set the value for the child object TypeCurrency.TypeCurrencyID thus I set the value of the variable sTargetPropertyName to TypeCurrency.TypeCurrencyID but the application willnot work stating that the property can not be found.
View 1 Replies
Oct 15, 2009
What is the best way to pass objects between threads? I would like to create a new thread that creates a new object : Dim myobject as newobject = new newoject Then in my main thread, I would like to use myobject. Ideally I would like to just assign to a global variable but I don't think that is possible. I think I may have to use some form of delegate function (but I think the child thread would need to complete to use a callback). The new thread will not actually end before I need the object reference in the main thread. How should I go about this?
View 2 Replies
Mar 9, 2010
I have a custom class (Class1) with a bunch of properties. One of the properties of this class is another custom class (Class2) with its own properties.I have a property grid with the selected object set to Class 1. I can see Class 2 as a property, but i would like to expand Class 2 to show its properties in the same property grid.
Im basically trying to do the exact same thing as the Font Class on a form. If you look at the properties of a form in the designer, you can see the font property. You can then expand that to show the properties of the font class.
View 1 Replies
Aug 11, 2009
I have a program I've been working on for some time now and I'd like to try to streamline it somewhat. I have a main menu form that has a split panel, in the left panel is a treeview that displays forms you can open and when one is selected, it opens in a child window in the right panel. Each time I open form I called DWNForm, it does a series of dataset loads which are the populating items for a series of listviews.
What I would like to do is have these datasets load once during the mainMenu load and then have the DWNForm be able to access the datasets once it is called from the treeview selection.
View 8 Replies