Connecting to an API offered by a Company - asp.net

I currently have an internal system that I need to link up to an API offered by a company. I am not looking for hand-holding on this, I really need to understand where and how to get started really.
Here is the developer resource for the API I am looking to work with:
http://wiki.cdyne.com/index.php/Postal_Address_Verification
Further, my systems are currently in ASP/ASP.NET & SQL, and I'm familiar with VB so I would rather stay that direction instead of C#.
Can I get some direction on how to tackle this? Thanks a lot for the help!

The easy way is to add a Service Reference in your project. Right-click the project in Solution Explorer and choose "Add Service Reference...". Copy the WSDL URL (from the documentation page you linked) into the address box and click Go. More: http://msdn.microsoft.com/en-us/library/bb628652%28v=VS.90%29.aspx
Use "WCFpav" as the Namespace to match the examples.
You should be able to use the C# example, just change the syntax for VB.Net (or use a converter, but it's a simple exercise).
Note: the Add Service Reference wizard is available in VS2008 and VS2010.

Related

How to develop a web browser using c# .net using installed.net libraries and without using the web browser control?

I have searched the internet for 2 days having found no answer to the below requirement. What i found most were GeckoFX and CefSharp which are external packages and not installed libraries. How can this be done?
I have been asked to do the following:
Use a suitable library function out of the set of libraries installed with the .NET platform. You must not use the C# WebBrowser class but perform the required HTTP-level communication directly from within your code. The code must clearly identify the HTTP-level client-server communication and must explicitly manage Home page, Favourite, History Lists and Tabs.
Optionally, you may add functionality to render a web page, but there must be an option to disable this functionality and to show only the raw HTML that has been retrieved.
Thanks
What have you attempted so far and what problem are you encountering?
Maybe read this first :)
Currently it sounds like you have been given an interview or homework task that you dont know how to solve. If so, then you should have some idea on where to start or you are in the wrong course or job interview. If you want help, then try to solve the question yourself and ask for help when you are stuck. Tell us what you have tried, show the code you currently have and let us know where you are stuck or what doesnt work as expected.
Where are you stuck? Fetching the webpage? Building the user interface?

How can make a query string like facebook.com/username?

I am building a website with asp.net. But I have an issue: I want to make user profile page link like in facebook.
For example,
"hostname.com/username" instead of "hostname.com/profile.aspx?something=something"
How can I achieve this?
Thank you for your time and valuable answers.
That feature called "URL Routing". If you are using MVC, then MVC Framework has That feature included. But if you are using Web Forms application, then You have to do this manual.
For Web Forms application, You can use Nuget Package Microsoft.AspNet.FriendlyUrls to make your application so that it generate url's what you want.
Refer http://www.devcurry.com/2013/05/friendly-urls-in-aspnet-web-forms.html
http://www.hanselman.com/blog/IntroducingASPNETFriendlyUrlsCleanerURLsEasierRoutingAndMobileViewsForASPNETWebForms.aspx (This is microsoft suggested)
This is typically done with a framework of some kind, but the concept it fairly simple --
If you're trying to do this quickly, you'll want to do your research on which one to use, but I'll explain the principle that makes it work -
In your server config (like an .htaccess) - you will rewrite the requests for *.aspx files go to a central index.aspx - this file then bootstraps your index however you want -
In your case, it would take the /username portion and query the database for a user with that username, fetch the associated data, and do whatever with it.
It's a relatively simple concept, and you could write something of your own device to bootstrap the request to your code, but you're probably better off looking for some (micro)framework that handles all that for you...
Good luck - !

Where can I find a clean API for Visual Basic development?

I am completely new to ASP.NET programming, and was asked to work on a small project involving ASP.NET, VB (which I am new to as well) and Microsoft SQL Server 2005.
Being used to php/java I was hoping to find some kind of similar API to php.net and the javadoc. It would be very useful to have as I would prefer to work with a text editor, instead of using DreamWeaver or Visual Web Developer.
In the project I basically only need to use ASP.NET to read from a SQL 2005 database and write to JSON files. Could anyone please give me some pointers on where to find a clean and decent API to work with? I would also appreciate any input and tips I could get to get started working on this.
I would prefer to work with a text editor, instead of using DreamWeaver or Visual Web Developer.
Imo this is a mistake in .Net. The platform was built with the IDE in mind. You really will be able to get a lot more done, and do it better, if you let yourself learn to use Visual Studio.
That said, the place to look for .Net documentation is, of course, the MSDN Library. Maybe start on this page:
http://msdn.microsoft.com/en-us/library/w0x726c2.aspx
only need to use ASP.NET to read from a SQL 2005 database and write to JSON files
You might want to take a look at ASP.NET MVC.
You controllers can return a JsonReasult which will automatically result in JSON being sent. No need to define any markup.
"Could anyone please give me some
pointers on where to find a clean and
decent API to work with?"
If you want to develop a VB.NET application, you have to use the VB.NET programming language; there are no other APIs available.
Where does javadoc fit into this? That's just markup you apply to your source code to create documentation. .NET has its own system which works in the same way but is built on XML.
As Joel says, Visual Studio has everything you need. It features a visual editor but also gives you access to all the source code.
you will need to have the IDE to develop ASP.Net application. It will be much easier using it. You can find docs and articles on developing on ASP.Net in this site. its a nice one.
https://web.archive.org/web/20211027112438/https://aspnet.4guysfromrolla.com/default.aspx#Tools2
https://web.archive.org/web/20210513213529/http://aspnet.4guysfromrolla.com/articles/042705-1.aspx
https://web.archive.org/web/20210802161558/https://aspnet.4guysfromrolla.com/articles/110905-1.aspx
work on a small project involving ASP.NET, VB (which I am new to as well) and Microsoft SQL Server 2005
It might not be VB, it might be VB.Net?

Providing SaaS functionality to a .NET portal with DLLs

I'm not sure I'm asking the right question here, but I'm looking to provide web based functionality from one ASP.NET application to another remote 'portal-like' application. Is it possible to simply give the portal a DLL? As an example, let's say the SaaS web app has a patient-entry form that I want to be able to use from the portal application. I would like the portal app to be able to set preferences (permissions, color, style, etc), make a function call, and have that capability presented within a certain div or something. Is there any .NET technologies that provide this kind of integration?
EDIT:
Here is a link to a quick diagram I made trying to describe the scenario: http://img.ly/ESG. I know there are other ways of doing this (eg JSON-P calls), but I need to give the portal developers something they can control on their end. Also, if anything changes they'll know I will send them a new version of the DLL which will indicate to them the new functionality.
I'll give you a shopping list of things to check out:
DotNetNuke:
http://www.dotnetnuke.com/
Workflow Foundation -
http://msdn.microsoft.com/en-us/netframework/aa663328.aspx
Microsoft SAAS platform -
http://www.microsoft.com/serviceproviders/saas/default.mspx
Depending on exactly what you're looking for, you might also research "multitenancy".
To answer your original question, yes, you can do it with DLL's, but there are easier ways to do it.

Reusable ASP.NET User Control Library : Virtual path provider or ascx/aspx copy?

I have a ASP.Net web application that I want to use as a reusable user control library in other web applications.
One solution for this problem is to use what Scott Guthrie has described here:
http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx
that is to copy ascx/aspx files (without their code-behind) in the web applications which use the control library.
I actually see another solution: to embed the ascx/aspx in the User control library and then use a custom virtual path provider to get them.
Does anybody know which solution is the best ?
From the deployment point-of-view, the virtual path provider seems to be better.
However the 'ascx/aspx copy' solution is easier to implement (no need to create a custom virtual path provider).
I really do not like Scott's solution. I believe it is ungly and creates overhead that is not necessary. I have also seen something similar in action and it just didn't work for me.
I too had the same requirement as you describe and I used the virtual path provider option. This way I could reuse all my user controls between web applications easily and without work arounds.
The virtual path provider has a couple of issues though:
If your ascx file has any server tags (in javascript or any other place for that matter) that cause an issue you will get a run time error that is not that helpful.
You have to rebuild your application every time you do a change to the ascx's mark up or to Javascript that exists on the file it self in order to see the results. That can be a real pain if you are trying to change the design of an existing control.
I have used the solution as described in this article and it worked very well:
http://www.codeproject.com/KB/user-controls/EmbeddedUserControl.aspx
I hope that helps...
I ran into this same situation a few weeks ago and I could not make Scott's solution work. I instead used Custom Server Controls and put those in their own Class Library.
I really don't think its a good idea to use user controls that way. If you need them in a separate library, you should convert them to server controls.

Resources