how to create a user on a website database using vba - c#

I am currently creating some client based software.
The client software uses an FTP function to create the clients name and folders based on that clients name. Then, when creating reports, it will upload that report to the current clients folder-reports.
i.e uploads/clients/[clientname]/reports.
But for now I have to log in to the website and create the user name based on the clients name in my software.
My question: Is there away in VBA or C# to do this? Create a user name based on the current users name <Field>?

You could use WordPress's API
Start by looking around yourself, using some Googlefu skills. Try to come up with some basic idea, even pseudo-code if needs be at then ask a new question with more a precise problem if you do encounter one.
Also, if you need to create FTP users through CPanel, it does have an API as well. How compatible it is with .NET, I do not know though.
But you have enough reading ahead to try something for yourself for the moment.

Related

Active directory ADWS WSDL vs C# implementation

So I'm trying to find a "Best" way to interact(create a interface) with Active Directory read/write mode. So I'm deciding between this two aproaches:
Try and use the ADWS.
C# Implementation.
Apparently for ADWS is not that easy even though there is a full WSDL I'v not been able to locate it, to try to do some test via SOAPui...
Now fort the C# Implementation there are few implementations
but still I'm not sure if its 100% doable to have full READ/WRITE to AD i.e. creating accounts users, query for users info, etc. from lets say REST WS.
So My questions are
Is there a way of getting a WSDL from the AD server so that I can use that as a starting point? ( I don't want to get me into PowerShell stuff or the like)
Are there any good articles for the latest versions C# ,libs, etc... to help me implement this?
Is there a better way of doing this?
As an example This is what we're trying to do:
Scenario 1:
Create a Web Service (INTERFACE) that expose AD information
The Web Service could be REST or SOAP
The WS should read/Query/Write the AD
Any Application inside the network can consume the WS
Scenario 2 (What we currently plan to do):
Sharepoint Reads AD Information
Job should copy AD to DB
Applications can read this data
There should exist some replication between the DB and AD
Any suggestions will be more than welcome
I'm Using server 2008R2 ,Sharepoint foundations 2010
I'm assuming this is related to your previous question which mentioned Exchange.
My personal suggestion is to host a WCF service in IIS. You can set this service up to do whatever you want to suite your needs for the apps accessing it. You can probably do most of what you need to do through the System.DirectoryServices.AccountManagement namespace when it comes to User and Groups.
System.DirectoryServices will give you more granular control at the cost of more work. However, it is a little easier and reading and writing from/to custom attributes here.
If you're going to interact with Exchange 2010 you'll need to mess with Powershell. And you could use Powershell to do core AD work as well.
And of course if you're going to write your own web service you could make it REST.
Here is a link to MSDN with info about System.DirectoryServices and the various namespaces. I personally find AD to be a lot of fun to work with. There are many ways to do the same thing in it so I don't think there's one right answer for you. Go with what you're comfortable with or challenge yourself to do something new!

How to host my ASP.Net admin panel without buying a domain?

I'm very new to web development but I will try to explain my question as best as I can.
I am making a basic admin panel program in C#. The admin panel will pass the data to android SQLite database using XML files, so XML file will be generated whenever admin updates data, and then it'll send the data to mobile phone.
Developing is all done but I need to host the admin panel in order to give XML links to my mobile app developer so she can create XML parser class or something. (please bear with me, I'm very new to programming). Anyway, I have no idea how to host it!
I've done some Googling but they all saying I need to buy domain name. I need to host it without buying domain.
Hope that's clear. Thanks in advance.
If you are looking for a very good hosting and you don't mind about the domain name definitely try microsoft azure it is very quality server and free when you don't want to use your domain name. I mean your address would be yourdomain.microsoftazure.com instead of yourdomain.com. It is always free and you can have an sql server database free for first year. however you should put a credit card number that only used for identification and microsoft never charge you for that.
See the site below:
https://azure.microsoft.com/

What are my options for sending data from Windows app back to developer without using a webserver

I am writing a simple WPF quiz application for a family member and he would like users of this application to have the option to send him their scores once they have completed the quiz. I was hoping to do this without the need to create some kind of webservice for the app to talk back to.
My initial idea was to email the results back, but that runs into problems. What if there is no SMTP client on the user's machine? I don't want to embed a password for a public smtp server into the application. I could do a Process.Start("mailto:..."), but that requires their machine to have a handler for mailto: and for them to click submit on the generated email.
Another idea I had was that the app could add a line into a Google docs spreadsheet, but that would mean a google docs password would need to be embedded in the app.
So my question is, without me writing a separate application running on a webserver for my WPF app to talk to, is there a good way of my app sending data back to me that doesn't require a password? I'm guessing there must be some kind of public webservice I could use for this?
If you're happy with a third party service that can do this for you, consider Parse, or any other 'backend as a service' provider.
You should then be able to implement something else that reads the saved data from the service when required, without having to expose itself as an API.
Create a google doc forms and when you need the user to submit their score, launch a web browser with the doc url. You can auto-populate the fields by query parameters( ... &entry_0=Barney&entry_1=Google& ... )

simple ASP.NET 4.0 login

I am new to ASP.NET (obviously). I need to create a really simple database driven user login system using ASP.NET. In PHP this is simple; just call session_start() at the top of the page and the session will be created or resumed. Then it is just a matter of connecting to the database and authenticating the user. I was able to learn this in less than 2 hours using php.
With ASP.NET and visual studio I am not having as good a luck. I have researched a bit, although not as much as I would like because I do not have a lot of time to spend on this, and read about two ways to implement logins. First you can use the password forms controls and put the user/pass info in the web.config. Second you could use the Membership API. I did not like either of these.
Is there not a way to do very simular to php where you just start the stinkin session, connect to the database, authenicate and your done? I am sure there is, I just haven't had the time required to research this as much as needed due to classes and work. I was hoping someone here could save me a little time and just tell me what to lookup! Thank you in advance!
btw, I want to use visual studio 2010 (if that matters).
If you create a web application, and use the default then it generates a template that has the full login system already implemented. You don't have to do anything, just modify the pages for your own purposes.
You should use the Membership API. It's simple, and easy. You should use the FormsAutentication system, it's secure and robust, and well tested. It takes seconds to implement, not two hours.
You can use Session.
Store the username and password on database, then you can create an ASP.Net form to log the user, where you will check if the given information match.
For example, if password and username match, you create a Session["Logged"] = true; if not: Session["Loged"] = false
Sorry about my english!

web based remote connections in c# advice

I am going to write up a webapp hosted on a windows 2003 server to allow me to connect to local and remote servers to do some basic things.
The webapp will be hosted on serverA. It will need to be able to copy files/folders from one folder to another on this server.
It will need to be able to connect to ServerB and copy files in the same way, e.g. copy \serverB\path\to\sourcefiles to \serverB\path\to\destinationfiles
ServerB hosts an installation of MSSQL 2008, I want to be able to create new database/login etc.
How do I go about this please? I've been reading a bit about Windows Authentication, Impersonation, Delegation but i don't know where to focus on.
thanks
S
To be honest there isn't really a one size fits all complete answer to your question, however there are a number of things that you need to take into consideration early in development to ensure that your platform is built on solid foundations.
From the description you have given the most critical consideration has to be security and everything you develop has to have this at its core. Judging by your post if the wrong person was to access your front end then they could wreak havoc.
As for the model to use, I would suggest Windows Authentication as this is built into the framework and gives you the ability to segregate into usergroups with differing levels of access. It will also open up some of the functionality you need, i.e. network copy of files etc
As for the database management aspect, this again can easily be done via Windows Authentication as you can grant (in SQL) windows users the ability to perform certain tasks, i.e. Create Database, Create Login, drop x, etc
All this said, it of course assumes that the two servers share user credentials, i.e. domain controller etc.
Another method, would be to use the web "interface" as a pass through onto a WCF service that operates under a specific user account that has the access you need. You would then seperately manage authentication/authorisation in a manner that you decide.
Like I said, no simple one size answer - but hopefully this will give you something to chew on.
If your goal is to create new databases or logins, why can't you use the create database and create login commands?

Categories

Resources