Click here to Skip to main content
13,289,439 members (66,252 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I have a website in Asp.NEt mvc3, Services that are Configured on Remote Server are perfectly Working but I want to test the Site on My Local to Judge How Fast it could work, In Fact I have Added some telerik Control in, Now I don't have Idea How could I do this

For example I have following Line of code in my Web Config for Account Memebership Service, When I try to Login from Admin Account it does not get into account, and give error UserName Or Password is incorrect from my Views.

<endpoint address="http://localhost:5229/Services/AccountMembershipService.svc"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMembershipService"
        contract="MembershipService.IMembershipService" name="BasicHttpBinding_IMembershipService" />

This Service I have Checked its running but I cannot login to Account or why it is not Showing me data that it should Extract from DB

when I use following line of Code It works
<endpoint address=""
         binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMembershipService"
         contract="MembershipService.IMembershipService" name="BasicHttpBinding_IMembershipService" />

So What should I do, any Idea

thank you
Posted 26-Jun-12 3:12am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is a lot more going on behind the scenes than you are showing us here (or can show us). Right now the code you posted looks fine. However, that all depends on your setup. It looks like there could be a couple different issues based upon what I see.

First, you might not have transferred the web service to your computer with the same settings as the server. It sounds like you are accessing a database inside your web service. Your machine might not have the ability to access that database server (because of firewall settings). Also, it could be that the account IIS Express is running your application pool under doesn't have rights to the database (if you are using trusted authentication).

Second, your pathing might be wrong inside your service. For instance, if your database is on the web server with your service, you might have referenced it with the dot (which means "this computer"). That won't work remotely. Also, if the web service accesses any files or other items by path, that path might be messed up.

In the end, I'm not sure that bringing all of this local in order to test maximum speed is a good idea. For instance, your local machine is most likely slower than the server (in terms of processor, RAM, etc.) Also, if you run the site with your debugger, it will be even slower. Finally, the results of the test won't give you good information to work with. If the site becomes blazingly fast locally, what does that show you? That it can? Real-world tests are the only true indicator of speed.

If you are trying to operate your web service locally using the development server (Casinni), that is probably your problem. Casinni is not designed to be accessed by other websites/services on your computer. I would recommend moving to IIS Express. IIS Express is designed to handle this and it is free. I wrote an article about how to use IIS Express recently. Here is a link: Make Web Development Easier with IIS Express[^]
M Ali Qadir 26-Jun-12 8:37am
Yes Great Answer I think first Line is right that I may not have transferred the web service to my local computer with same setting as in the server, and I am accessing data inside my web service, I have does not setup IIS also I am trying it with Built in Development Server, Despite all this is true, Can you let me know some Material to Setup service on my local Computer With same Configuration as often in the server machines, I Hope I will get out of This problem. thank you Tim
Tim Corey 26-Jun-12 8:43am
I've updated my post based upon this information. I would start by changing out the development server for IIS Express. This is probably your first problem.
M Ali Qadir 26-Jun-12 8:47am
Yes Its Great Post Thank You
M Ali Qadir 26-Jun-12 10:36am
hi, Tim I have tried All Provided Stuff but Call to DB is not yet functional could you let me know some more Tips to Troubleshoot This problem
Tim Corey 26-Jun-12 10:39am
At this point, I would recommend loading up the service in Visual Studio, adding a Console app as the "front end" to test it, and stepping through the code to see where the error is.
M Ali Qadir 26-Jun-12 10:39am
I have Try Using IIS, I have added Site to it, and also let project Use IIS but I am not able to extract data From the DB I think there may be some other Issue, But I if I change the Web Config to HostName then It works fine what could be the cure to this Problem. thank you
Tim Corey 26-Jun-12 10:42am
It depends on what you mean by "hostname". If you mean that you point back to the web service on the server, that doesn't really help. See my comments above if that is the case. If you mean that you reference your local machine by its hostname and it works, then your problem is solved. Just use that (it is still working locally in this case).
M Ali Qadir 26-Jun-12 10:46am
In fact if you see my Post there I have Mentioned That when I use localhost It does not work And If I use server host Name then It works on my Machine then It works. Like This Works Fine but not this One http://localhost:5229/Services/AccountMembershipService.svc
Tim Corey 26-Jun-12 10:51am
I read what your post said. However, hostname could mean your local machine or your server. Both have a host name. I cannot tell from your above statement if you meant the hostname of the server or your local machine's hostname. It would make a difference. I have services on my machine that I cannot call using "localhost" but that I can call using my local machine's hostname. In any event, you are going to have to follow the instructions I listed above about debugging your web service locally.
M Ali Qadir 26-Jun-12 10:59am
Thank You, To Clear The Point I would say that I am using HostName of Server on my Local Machine.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171207.1 | Last Updated 26 Jun 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100