I've created a web service using VS 2010 and .Net 3.5, deployed on Win7. No hiccups regarding performance or functionality. However, after adding performance counters I realized that the web service is restarted every few thousand calls (which happens after a few seconds).
The application pool has already been changed to not use recycling but this behavior persists.
I've realised that the custom controls that I add to the toolbox are lost on restart of Visual Studio 2010 RC 1.Was there a problem that occured during the installation or is it a know bug?I did not encounter this problem with the beta 2.
In my ASP.NET app, I noticed that the results of any web service calls are cached. I don't want any results to be cached, how can I stop the browser from caching the results?Update:Here's the proxy code generated by calling the web service URL appending '/js', e.g. /mywebservice.asmx/js
I developed a web service in VS2010 on my local machine, wrote a consumer of it also locally, and that all works.
I copied the dll and the asmx file to our server, and I am getting an error when I try to invoke it from a browser (also still on the server machine) to make sure it correctly exposes its web methods, but it is not, it is saying "Could not create type 'Service'". That error comes from this line:
Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/WarrantyDuplicate.cs" Class="Service" %> There other web services in the same folder on the server that all work fine so I don't believe it's an IIS setup thing.
This is my first web service in C# and when I created it in VS I did think it odd that the code behind file went into App_Code (as you can see from the line in the asmx file) and is just named dot-cs rather than asmx-dot-cs. But since it worked fine locally, I wasn't sure that mattered.
I have web page in asp.net and it goes to top left in web browser in different resolutions (with pressing ctrl n scrolling mouse) and controls also comes out of tables n div.
I've written some code to scan a directory and write the images to a different view. I'm using buttons with CommandName="NextView" and CommandName="PrevView" to navigate to the following view.
My code to write the images to the different views is called upon the page_load event.
However after clicking the next and previous button this seems to cause a page reload as the images are written to the view again so I end up with duplicate images.
I googled a bit and one of the suggestions was to place the multiview in an contenttemplate and updatepanel but that didn't work either.
Now I've solved the problem by clearing the labels to which the images are written in the page load before the other code fires.
how to prevent a rendered ASPX page from having the encrypted data in the head area. With the fact that the data is in there, it prevents bots and crawlers from reaching the true SEO data within the page. I would like to use ASPX pages to create my web pages. As of now, I cannot because of the garbage loaded in the beginning of a rendered page.
I have a ASP.NET XML web service (asmx) running on .NET 3.5. I am trying to figure out how best to prevent replay attacks. Is there any inherent security by .NET 3.5 that should mitigate this issue, or do I need some kind of SOAP header token value?
I'm using Visual Studio 2010 and working on an ASP.NET 4.0 web application. At the moment, a co-worker and I are tweaking CSS, which means constantly changing and saving CSS files and then refreshing the running page in a web browser.Every few saves, the application restarts, causing a considerable delay while we wait for the app to start up, log in again, and return to the page we were working on. In an IIS production environment a CSS file wouldn't go through the ASP.NET ISAPI, but apparently when running with VS2010 and the developent web server this doesn't matter... or something.
I have set up the Auto complete control and the web service to populate it, this web service resides within the project that uses it, it works fine on my machine (if I had a nickel for every time I heard that from a developer...) , but when I install it on Dev, the site asks for authentication, then when I select the tab with the textbox that has the Auto Complete control, it asks me for authentication again. If I remove the Auto Complete control, it no longer asks me. The funny thing is, I can enter authentication info OR just click cancel and the web service works fine.
In the IIS site on Dev and in the Web config, I have turned off authentication (in IIS I use anonymous and in the Web.config, I set it to "none") My development machine is in a domain, for some reason beyond my control, both Dev and Prod are not in a domain; both Dev and Prod machines are Server 2008. how to prevent this authentication form from showing???
I'm maintaining a legacy XML web service system (Framework 2.0), and is trying to return an XML fragment as part of a SOAP response. Problem is: SOAP will auto-enclose the XML fragment in <[CData[]]> tag, and I want to avoid this.
I am new to the whole ajax/jquery/web service scene. I am trying to create a web service to pass back data for a jquery post and currently have two errors. It appears there are examples the web but must in c and looking for something in vb. Below is my web service. See in bold the error descriptions and in red the items visual studio is highlighting.
WordsService.asmx HTML Code: <%@ WebService Language="VB" CodeBehind="~/App_Code/WordsService.vb" Class="WordsService" %> WordsService.vb Code: Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.Runtime.Remoting.Services Imports System.Collections.Generic Imports System.Data.SqlClient Imports System.Data Imports System.Web.Script.Serialization ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. <System.Web.Script.Services.ScriptService()> _ <WebService(Namespace:="[URL] <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Public Class WordsService Inherits System.Web.Services.WebService Private _sConn As String = ConfigurationManager.ConnectionStrings("DB").ConnectionString
'1) Type 'ScriptMethod' is not defined.
'2) Value of type '1-dimensional array of String' cannot be converted to '1-dimensional array of 1-dimensional array of String' because 'String' is not derived from '1-dimensional array of String'.
<WebMethod(Description:="Gets the books matching part of a title."), ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _ Public Function GetBooksByTitle(ByVal strTitle As String) As String Dim myConnection As SqlConnection = New SqlConnection(_sConn) Dim objCommand As SqlCommand = New SqlCommand("SELECT * FROM table WHERE field like '%" _ + (strTitle + "&' ORDER BY field;")) Dim dsSearch As DataSet = New DataSet Dim sdaSearch As SqlDataAdapter = New SqlDataAdapter(objCommand) sdaSearch.Fill(dsSearch, "english") myConnection.Close() ' Create a multidimensional jagged array Dim JaggedArray()() As String = New String((dsSearch.Tables(0).Rows.Count) - 1) {} Dim i As Integer = 0 For Each rs As DataRow In dsSearch.Tables(0).Rows JaggedArray(i) = New String() {rs("BookNum").ToString, rs("Title").ToString, rs("Author").ToString} i = (i + 1) Next ' Return JSON data Dim js As JavaScriptSerializer = New JavaScriptSerializer Dim strJSON As String = js.Serialize(JaggedArray) Return strJSON End Function End Class
Here is the article I am currently following for example: How To Create A JSON Web Service In ASP.NET.
I'm going to be calling a webservice that will return me data in xml format. Since the web service is not ready yet, I want to test locally by calling a function that returns the xml. So if I have a sample xml file on my hard-drive, how do I just open it and read it and create an xml string from it? I don't care at this point about parsing anything out; I will do that in the caller and have that written. I just want all the xml back.
I've only worked with web services a little bit. I am working on a project now using another developer's code as a template. It is code for a single sign on (SSO).
Also let me say, I have been coding in VB6/VB.NET for the past six years and am learning C# (that is what the other developer's code is written in).
setAppCredentials() is the beginning of a lot of sub-calls and I have gotten that all to work when I was running the service from within its own Visual Studio project.
Where I am having the problem is setting credentialHeader.Username and credentialHeader.Password. credentialHeader is nothing when I call validateCredentials().
I didn't see how I had these exposed to me in order to set them. So the developer said Create a client that consumes that service and set the values there and call your method.. But I still don't see how it's exposed to my consumer. I have this line of code in the consumer
Code : Dim myWebService As New localhost.xxxMemberService
(Back to VB!,) but I still don't see credentialHeader exposed.
The only other thing I see in the webservice code that might be relevant is this:
I wrote a web service for a co-worker. The web service is in VB.NET, and it works fine for me. When I write a consumer and walk-through it, it returns me the correct data, and when I run the URL in a browser, the methods are exposed to me.
My co-worker wants to call this web service using JSON. He is debugging it in Firefox with Firebug. He gets a pop-up entitled "Authentication Required" and it says Enter username and password for <the URL> of the website (under which the folder of my webservice has been defined as an application in IIS), and there's a textbox for an id and password. Firebug says 401 unauthorized.
I am developer, not a SA, so I don't understand a lot of the hits I am getting when I google this error. I did change one thing in IIS, though. We have another web app on another server where we've employed the exact same model, and that web service works. So I am trying to compare the two. I changed Authentication so that Anonymous Authentication was Enabled and the others were Disabled. I was hopeful this would work, especially because Basic Authentication and Windows Authentication's Response Type were HTTP 401 Challenge, but that did not work, unless I need to restart something (do I?).
I have a number of .Net web sites built in VS2010 using Framework 4.0that reference a web service to send emails.
My most recent site I created as a web application as opposed to a web site. In the Solution Explorer you can add a 'Service Reference' and, if you click the Advanced button you can then add a reference to a web service.
I did that and now the (web application) site won't build - it says it cannot load the Ajax dll. If I remove the reference to the web service, the site builds okay - if I add the reference back in, the site will not build.
Do I need to abandon the idea of using a 'Web Application' and turn it into a 'Web Site'?
Public Function HelloWorld() As String Dim orgcon As New OLEDBConnection("Provider=Microsoft.jet.oledb.4.0;data source=c:dataDB.MDB") Dim OrgDA As New OleDbDataAdapter("select * from organization order by orgname", orgcon) Dim Orgds As New System.Data.DataSet OrgDA.Fill(Orgds, "Organization") Dim hwstring As String hwstring = orgds.tables(0).rows(0).item(3).tostring Return hwstring End Function
The flash just gives me an error that there was an error opening the web service. For some reason I canīt debug it in vwd.
I am writing a web service for a customer. I tested it locally fine using a consumer, but he is having an issue calling it from his jquery, so he asked for logging.I figured I would use the Windows Event Log for this purpose. after I added the event log and was testing it locally via the consumer, I had an error saying The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security. So what I did to solve that was restart Visual Studio with administrator privelege so the event logs could be searched. And I am writing to my event log locally with no other issues.
My question is, when my customer intalls this new version of my web service, will it be able/unable to search the logs and if unable, how can it be given admin privelege so it is able, or again is that a bad idea?
I have a deadline to install my windows service NOW. I developed it in VS2010 and chose the .NET 4.0 framework. The server where I am installing it, which is a server that hosts our live web sites, does not have .NET 4.0 installed. So I have to change the framework to 3.5. I have this error now when I try to build:
Error13Type System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a in the data at line 120, position 4 cannot be located. Line 122, position
5.C:DevprojectsDocFtpToVendorDocumentFtpProjectInstaller.resx1225DocumentFtpIt is in ProjectInstaller.resx and also Service1.resx. Is it because the version=4.0.0.0, and if so how do I change that? And if not, what is the cause?
Now I want to create several filesystemwatchers in my Windows Service and have them monitor different folders but do basically the same thing when files are created. That is, they will be calling the same routines. So my code so far is this:
Code: // 10/14 - Create N fsw's as specified in the config file. int nbrFsw = Convert.ToInt32(ConfigSettings.ReadSetting("NumberOfWatchers")); List<FileSystemWatcher> listOfFsw = new List<FileSystemWatcher>(); for (int i = 0; i < nbrFsw; ++i) { FileSystemWatcher fsw = new FileSystemWatcher();
[Code] ....
Is there a potential problem that all fsw's that get created are calling the same "on created" event handler? Or will this work nicely?
My requirement is this. I need to watch Output folders and when pdf files are created here I upload the files to a server. These Output folders are in web app deployments. I need to do this function for more than one deployment on the same machine, thus my need for more than one fsw.
This will ultimately be a web service but I am trying this out in a windows program, hence the presence of lblMessages which is on a windows form...
My instructions for creating a new web service with VWD 2010 Express call for using the installed template, "AST.NET Web Service". But this template is not listed.
I would like to create a simple web service in visual basic, place it in IIS 7 on my desktop, and then consume it probably using a proxy class.
Is there another way to create a new web service in VWD 2010 Express?