473,382 Members | 1,348 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Web.Config Issues?

Folks,

I'm hosting through 1and1.com. I don't have a lot of experience
deploying asp.net apps on shared webservers.

I keep getting the following error message when trying to have my
ASP.Net (2.0) web service access the SQL 2000 database:

System.Web.Services.Protocols.SoapException was unhandled
Actor=""
Lang=""
Message="System.Web.Services.Protocols.SoapExcepti on: Server was
unable to process request. ---System.InvalidCastException: Conversion
from string "Data Source=mssql06.1and1.com;In" to type 'Integer' is not
valid. ---System.FormatException: Input string was not in a correct
format.
at
Microsoft.VisualBasic.CompilerServices.Conversions .ParseDouble(String
Value, NumberFormatInfo NumberFormat)
This does not make sense why is would be trying to convert my web.config
connection string into an integer.

Here's my web.config file:
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<add name="Web_LocatorConnectionString" connectionString="Data
Source=mssql06.1and1.com;Initial Catalog=db181902399;User
ID=dbo181902399;Password=xxxxx" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="false" strict="false" explicit="true"/>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>

<customErrors mode="Off"/>
</system.web>
</configuration>

Thanks for any help and insight!
Jan 26 '07 #1
7 6352
unable to process request. ---System.InvalidCastException: Conversion
from string "Data Source=mssql06.1and1.com;In" to type 'Integer' is not
valid. ---System.FormatException: Input string was not in a correct
format.
at
Microsoft.VisualBasic.CompilerServices.Conversions .ParseDouble(String
Value, NumberFormatInfo NumberFormat)
Probably somewhere you code is doing that... accidently!

Is there any thing more in the stack trace?

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------
Jan 26 '07 #2
Here is the full stack trace:

Again, this line is in my web.config file, not a line of code.

System.Web.Services.Protocols.SoapException was unhandled
Actor=""
Lang=""
Message="System.Web.Services.Protocols.SoapExcepti on: Server was
unable to process request. ---System.InvalidCastException: Conversion
from string "Data Source=mssql06.1and1.com;In" to type 'Integer' is not
valid. ---System.FormatException: Input string was not in a correct
format.
at
Microsoft.VisualBasic.CompilerServices.Conversions .ParseDouble(String
Value, NumberFormatInfo NumberFormat)
at
Microsoft.VisualBasic.CompilerServices.Conversions .ToInteger(String Value)
--- End of inner exception stack trace ---
at
Microsoft.VisualBasic.CompilerServices.Conversions .ToInteger(String Value)
at UploadData.UL_Equipment(Locator_DataSet RemoteDS)
--- End of inner exception stack trace ---"
Node=""
Role=""
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at TestWS.localhost.UploadData.UL_Equipment(Locator_D ataSet
RemoteDS) in D:\Net Dev\AM_LocateMgr\TestWS\TestWS\Web
References\localhost\Reference.vb:line 179
at TestWS.Form1.btnSaveData_Click(Object sender, EventArgs e) in
D:\Net Dev\AM_LocateMgr\TestWS\TestWS\Form1.vb:line 31
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m,
MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at
System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationCo ntext context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[]
commandLine)
at TestWS.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Gaurav Vaish (MasterGaurav) wrote:
>unable to process request. ---System.InvalidCastException: Conversion
from string "Data Source=mssql06.1and1.com;In" to type 'Integer' is not
valid. ---System.FormatException: Input string was not in a correct
format.
at
Microsoft.VisualBasic.CompilerServices.Conversion s.ParseDouble(String
Value, NumberFormatInfo NumberFormat)

Probably somewhere you code is doing that... accidently!

Is there any thing more in the stack trace?
Jan 26 '07 #3
at TestWS.localhost.UploadData.UL_Equipment(Locator_D ataSet
RemoteDS) in D:\Net Dev\AM_LocateMgr\TestWS\TestWS\Web
References\localhost\Reference.vb:line 179
Seems to me that you have a proxy-client for a web-service on "localhost".
Now that it is trying to connect to the service on "localhost", it does not
exist in a shared-web-hosting.

You will need to update it appropriately.

Also, it seems that the client expects an integer while the service has been
modified (or, in my opinion, wrongly referenced) and returns a string.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------
Jan 26 '07 #4
I have modified the URL in code, the service was developed locally
(hence the localhost reference). It is connecting to the proper public
url, but with the error I indicated.

The line referenced is the connection string line in the web.config
file. It is a connection string, which should be a string. What would
make ASP.Net try to turn it into an integer?

Thanks!

Wayne Pedersen

Gaurav Vaish (MasterGaurav) wrote:
> at TestWS.localhost.UploadData.UL_Equipment(Locator_D ataSet
RemoteDS) in D:\Net Dev\AM_LocateMgr\TestWS\TestWS\Web
References\localhost\Reference.vb:line 179

Seems to me that you have a proxy-client for a web-service on "localhost".
Now that it is trying to connect to the service on "localhost", it does not
exist in a shared-web-hosting.

You will need to update it appropriately.

Also, it seems that the client expects an integer while the service has been
modified (or, in my opinion, wrongly referenced) and returns a string.

Jan 26 '07 #5
The line referenced is the connection string line in the web.config file.
It is a connection string, which should be a string. What would make
ASP.Net try to turn it into an integer?
That's what keeps me wondering still now.
I think it's impossible to provide any support unless there's a peek on the
code :(
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
Jan 27 '07 #6
Code:

Desktop App (Consuming web service):

Public Class Form1
Dim svc As New localhost.UploadData
Private Sub btnGetData_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnGetData.Click
Dim ds As New localhost.Locator_DataSet
ds = svc.GetEquip
Grid.DataSource = ds
Grid.DataMember = "Equipment"
End Sub

Private Sub btnSaveData_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btnSaveData.Click
Dim ds As New localhost.Locator_DataSet
For x As Integer = 80 To 100
Dim newRow As DataRow = ds.Equipment.NewRow

newRow.Item("EquipmentID") = x
newRow.Item("Name") = "Test Record " & x

ds.Equipment.Rows.Add(newRow)
Next

svc.UL_Equipment(ds)

ds.Clear()
ds = svc.GetEquip
Grid.DataSource = ds
Grid.DataMember = "Equipment"
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
svc.Url = "http://www.ariesearch.com/datamerge/UploadData.asmx"
End Sub
End Class


WebService (Serving the GetEquip Routine):

<WebMethod()_
Public Function GetEquip() As DataMerge.Data.Locator_DataSet

ta_Equip.Fill(ds_Loc.Equipment)
Return ds_Loc

End Function



Gaurav Vaish (www.edujini-labs.com) wrote:
>The line referenced is the connection string line in the web.config file.
It is a connection string, which should be a string. What would make
ASP.Net try to turn it into an integer?

That's what keeps me wondering still now.
I think it's impossible to provide any support unless there's a peek on the
code :(

Jan 30 '07 #7
Desktop App (Consuming web service):

Strange!
Nothing fishy in this.

At the moment, I'm nothing but totally clueless. :(
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
Feb 7 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Ryan | last post by:
I've created a custom configuration section that inherits (naturally) from System.Configuration.ConfigurationSection. The configuration section is working 99% fine, however I keep coming across a...
1
by: Matt F | last post by:
Two of the projects in my solution that both need to use a common user.config file. This is a data application - the executable that is created with the first project is the primary executable...
3
by: Brad | last post by:
Probably a very basic questions here: When using code to look at a web.config item, how can I tell if the value is/is not inherited? I have some common code that needs to iterate through settings...
6
by: TS | last post by:
I cannot get this to work. I added an app.config to a project i reference from my web application project (vs 05) but can see no way to access the settings within it. the other thing is that I...
3
by: SevDer | last post by:
Hi All, I am recently experiencing a weird problem. I don't know what exactly is the cause of the problem but here is my scenario and symptoms. First of all here is my architecture 1. I have...
3
by: =?Utf-8?B?RHVrZSAoQU4yNDcp?= | last post by:
I've added a web deployment project and want to use the config section replacement but I'm obviously not understanding something. I have set up an alternate appSettings file,...
1
by: =?Utf-8?B?Q2h1Y2sgUA==?= | last post by:
I have an asp.net solution with a web deployment project. When we try to build/debug, we get the message: An editor or project is attempting to check out a file that is modified in memory,...
10
by: =?Utf-8?B?TUNN?= | last post by:
When creating a new VB Web Application Project with VS2008, there are several settings (compiler settings, option strict, etc) that appear both in the web.config file and "My Project". I'm...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I cut and paste the following code from msdn help page which it just introduces view and multiview server controls. Here is what I do: in vs studio 2005, File --New Web Site, it...
5
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a app that uses several membership/role providers. I can list these Providers with the code: Dim rootWebConfig1 As Configuration rootWebConfig1 =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.