|
Isn't Visual Studio supposed to do this for you?
Under the web tab for the web service project, I have it set to Use Visual Studio Development Server, and have it assigned to that specific port. I don't know if I have to actually "run" anything to run it though.
EDIT: So after hearing you mention that, I just tried to run the web service project itself... and it seems like you have to do that in order to get anything started.
In the meantime though, I have another question about web services and web methods (but I'll just reuse this existing thread).
I have a web method that takes in a class WebObject (something that I created).
public class WebObject
{
public WebObject(int x, int y, int z)
{
this.x = x;
this.y = y;
this.z = z;
}
private WebObject()
{
}
public void SetX(int x)
{
this.x = x;
}
int x;
int y;
int z;
}
The web method, looks like this:
[WebMethod]
public WebObject AnalyzeObject(WebObject obj)
{
return obj;
}
What's happening though, is that behind the scenes, in some Reference.cs file generated by this web service, the WebObject is being transformed into this:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1433")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public partial class ODPOObject {}
This new empty class makes it so that I cannot call the web method with my int x, int y, int z constructor, and if I attempt to create THAT WebObject, it complains that I'm passing in the wrong type. I don't understand this concept at all... would anyone be able to please clarify?
|
|
|
|
|
Cyrilix wrote: Isn't Visual Studio supposed to do this for you?
When you run the web service from VS, yes. But without VS, you need to have it in IIS. At least I think so ( I use the casini web server and it works fine there )...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Since you already replied, and I was a little late in editing, I'll add the other part of my last post to this reply:
I have a web method that takes in a class WebObject (something that I created).
public class WebObject
{
public WebObject(int x, int y, int z)
{
this.x = x;
this.y = y;
this.z = z;
}
private WebObject()
{
}
public void SetX(int x)
{
this.x = x;
}
int x;
int y;
int z;
}
The web method, looks like this:
[WebMethod]
public WebObject AnalyzeObject(WebObject obj)
{
return obj;
}
What's happening though, is that behind the scenes, in some Reference.cs file generated by this web service, the WebObject is being transformed into this:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1433")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public partial class ODPOObject {}
This new empty class makes it so that I cannot call the web method with a web object created using my int x, int y, int z constructor, and if I attempt to create THAT WebObject, it complains that I'm passing in the wrong type. I don't understand this concept at all... would anyone be able to please clarify?
|
|
|
|
|
Strange! Code shows your WebObject class is not marked as serializable. To pass the object to webservice, it should be marked as [Serializable]
|
|
|
|
|
Hi All,
I am very new to ASP and need to create a simple dynamic image gallery wherein when the user clicks on the menus (collapsible kind) and the respective image shows up with the title and text. I could do this in simple HTML but then would have to create 20-30 pages.
Is there any way we can do this dynamically through ASP so on the same page all the variables are passed and the image/text changes accordingly. Hopefully this won't require any server side scripting?
I have uploaded a zip file here having the sample pages: http://www.filedropper.com/gallery_1
Thanks,
|
|
|
|
|
Yes you can do it using asp but i highly doubt that anyone on this site will give you the source code for it. unless you pay them.
|
|
|
|
|
Do you mean ASP or ASP.NET ?
sannysmith wrote: . Hopefully this won't require any server side scripting?
Well, if it doesn't, then it would end up being pure HTML. What do you think ASP.NET code is ?
It sounds to me like you're not clear at all on what ASP.NET is. You should buy a book and work through it. Yes, your best bet is to use a control like a gridview or repeater and writing code that pages and displays your images.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello dear.
I want to do following.
There is one dropdownlist on asp.net page.
On selection changed event a new dropdownlist should be created.
And on the each drop down list selection change event a new dropdownlist shold be added.
In Windows Form application i achieved this with the following code.
public partial class Form1 : Form
{
ComboBox c = null;
int y = 10;
public Form1()
{
InitializeComponent();
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
c = new ComboBox();
c.Items.Add("Item 1");
c.Items.Add("Item 2");
c.Items.Add("Item 3");
c.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
c.Location = new Point(((ComboBox)sender).Location.X, y = y + 50);
Controls.Add(c);
}
}
It's urgent please help.
|
|
|
|
|
Yes, you can do it. But, you need to add the controls before page_load in order for their viewstate to be restored, and thus for events to fire. The other option is to have one or more hidden text controls and to use javascript to store the details of your state there, so that you can always read that and recreate your controls.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
The problem is that we don't know how many drop down lists will be created. So how we can dynamically add the drop down list on asp.net page as the selected index change event of another drop down list control occurs.
If a demo is available then it will be a great favour.
Thanks for your time.
|
|
|
|
|
OK, this error is officially driving me insane. I've been at it for a few hours, googled, tried the suggestions I've found and nothing works.
This used to build OK and only some greater power can discern why it stopped. Mind you, I haven't touched this code for months.
This is the partial code in the code behind for the web service:
[WebService(Namespace = "http://tempuri.org/", Name = "AddBlogEntry")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class AddBlogEntry : System.Web.Services.WebService
{
[WebMethod]
public bool AddEntry(string blogEntryData, string blogEntryTitle, string blogEntrySubTitle)
{
try{
...
This is the line in the asmx page:
<![CDATA[<%@ WebService Language="C#" CodeBehind="AddBlogEntry.asmx.cs" Class="McdnWebservices.AddBlogEntry" %>]]>
And this is the error that I get:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'McdnWebservices.AddBlogEntry'.
Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind="AddBlogEntry.asmx.cs" Class="McdnWebservices.AddBlogEntry" %>
Source File: /mustafacodes.net/McdnWebservices/AddBlogEntry.asmx Line: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
Any clues?
|
|
|
|
|
dumb question - does the web service still exist ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yep. One more item of info, this error is local for now. I'm trying to rebuild everything before I commence altering the application/site.
|
|
|
|
|
hi,
I am convert in my project asp 1.1 to 2.0. if i am change in my asp 2.0
project that is a have add in one button control
Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
the error is has multiple definition with identical signtures.
Please help me how i am add button in my project.
Thank you,
|
|
|
|
|
why do you have a button called button1 ?
Are you saying this code already existed, or that you;re adding it ? Did you check to see if you do have two methods with the same signature ? I assume the compiler is telling the truth. Search your whole project for that method, it's possible that where it lives changed between 1.1 and 2.0.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i am developing one website in that
i was take masterpage then as follows below
1)first cut the content placeholder and insert one table with two rows & two columns.
2)inserted contentplaceholder into 2nd row 2nd column.
3)take one menu control and one dropdownlist and one label in remaining section in the table.
4) inserted all childpages into website.
5)At the time of execution first i selected one of the item from dropdownlist then i clicked one of the item in menu control.
after first time dropdownlist selected item should be changed then
what can i do for that dropdownlist should not be change until i was select
i wrote entire logic in menu_clickevent
|
|
|
|
|
santoshpoosarla wrote: 5)At the time of execution first i selected one of the item from dropdownlist then i clicked one of the item in menu control.
after first time dropdownlist selected item should be changed then
what can i do for that dropdownlist should not be change until i was select
i wrote entire logic in menu_clickevent
use AJAX To Resolve this issue .
|
|
|
|
|
after logout user shuld not visit the previous page by clicking back in the firefox browser
|
|
|
|
|
You need to clear down their session/cookies/however you persist their login when they logout.
|
|
|
|
|
Hy,
I have created a pop up and it works perfectly ....but the problem is i hav to show it on the a fixed position all the time(lets say on left side top most...i used the following code
document.getElementById ("popup").style.position='absolute';
popup.style.top = '25px';
popup.style.left = '25px';....but i cant seee the pop up whn i can scroll down....
how can i show the pop up even ahn i scroll down...
ragards
|
|
|
|
|
Hello All,
I have to set two instance of my application on one machine. To work my application property i have to set my application as homedirectory of IIS. But now my problem is that, How can i set two homederectories for same IIS as i have to install two instance of my application.
Does anyone have solution for it? I heared about hostfile, but i dont know much more about it and how host file can help me.
Please let me know ASAP.
|
|
|
|
|
Whose performance is better with microsoft dotnet oracle or sqlserver
|
|
|
|
|
I think that it depends how we designed the database structure and code.
Balasubramanian K.
|
|
|
|
|
It depends who you ask - Oracle users will claim oracle, SQL Server users will claim SQL Server
To be honest, a more lot depends on the database design than the vendor.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
My appn. was working well. Suddenly It throws, the error in web config file called "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS". I've never changed anything in my webconfig file. What the problem will be?
Tnx in adv.
|
|
|
|