|
Hi,
I craeted a simple web service.In c# application(Client for web service) i click on ADD Web Reference->Web Services On Local Machine.
It displays the list of web services from my system.I selected one from those web services.and click on GO.Now iam getting the parser error.
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 'Service'.
Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind=@"C:\Inetpub\wwwroot\wscr01\calc\App_Code\Service.cs" Class="Service" %>
Why iam getting this error.Please help me.And please provide me the links for learning Web services.
Thanks in advance.
|
|
|
|
|
hi,
iam having an application with 6 text boxes and 2 buttons.on click of one butoon 1st need to desable first 3 text boxes .on click of one butoon 2nd need to desable first 3 text boxes using Java script.
kamalnath
|
|
|
|
|
As far as I understand you need to use code behind for first button click
and JavaScript for second button click. If this true
Your first button (ButtonName1) code behind will look something like this.
TextBox1.Enabled = False
TextBox2.Enabled = False
TextBox3.Enabled = False
For JavaScript you can add onclick attirbute to your second button at load time like this.
ButtonName2.Attributes.Add("onclick", "HideTextBoxes()")
The HideTextBoxes function must be at the bottom of you page (after controls are loaded).
function HideTextBoxes(){
document.getElementById("TextBox4").setAttribute("disabled", true)
document.getElementById("TextBox5").setAttribute("disabled", true)
document.getElementById("TextBox6").setAttribute("disabled", true)
}
|
|
|
|
|
hey
i m creating a web appln in c#. recently i implemented session var in my website to enhance security.. but the problem is that after publishing this website on IIS(inetpub\wwwroot..), i opened it from my browser.. the sessions are not at all working..
even after entering correct username and pass.. i m redirected to login page again and again..
on the other hand when debugging the application, it works perfectly well.. m using visual web dev exp 2005
please help
Kunal Piyush
|
|
|
|
|
Please don't cross post.
---
Here are two things to check:
Check that session handling is not disabled in the web application.
Check that the browser is not set up to refuse cookies.
-- modified at 4:42 Friday 25th August, 2006
---
b { font-weight: normal; }
|
|
|
|
|
how shud i check that..
Kunal Piyush
|
|
|
|
|
hi all
How can i hide a row with template columns in infragistics ultraweb grid
Thanx in advance
nidheesh kuvil
|
|
|
|
|
Hi,
I have a variable I need to set, from a function in the same class. I am doing the following:
Dim FGBS1 as String = getCompanyCode(strDivisionCode)
and the other function:
Public Shared Function getCompanyCode(ByVal strDivisionCode) As String<br />
<br />
Dim DivisionCode As String = strDivisionCode<br />
<br />
Dim ReturnedCompanyCode As String = ""<br />
Dim MyCompanyCode As String<br />
<br />
Dim CompanyCode As String = ""<br />
Dim CompanyLevel As String = ""<br />
<br />
Dim objConnSelectFloatSQL As SQLConnection = New SQLConnection(DB2TestConnectionString())<br />
Dim selectFloatSQL As String<br />
<br />
Try<br />
<br />
If DivisionCode <> "" Then<br />
<br />
'Level 4/5<br />
selectFloatSQL = "SELECT CompCode, CompNum from tblComp where CompNum = '" & DivisionCode.Trim() & "'"<br />
<br />
Dim objCmdSelectSQL As SQLCommand = New SQLCommand(selectFloatSQL, objConnSelectFloatSQL)<br />
<br />
objConnSelectFloatSQL.Open()<br />
<br />
Dim objDr As SQLDataReader = objCmdSelectSQL.ExecuteReader()<br />
While (objDr.Read())<br />
CompanyCode = objDr(0).ToString.Trim()<br />
CompanyLevel = objDr(1).ToString.Trim()<br />
End While<br />
objConnSelectFloatSQL.Close()<br />
<br />
If CompanyLevel <> "3" Then ' either level 4 or 5<br />
getCompanyCode(CompanyCode) <br />
Else 'if level 3<br />
MyCompanyCode = CompanyCode<br />
End If<br />
Else<br />
MyCompanyCode = "LEVEL does not exist for:" & strDivisionCode<br />
End If<br />
<br />
Catch ex As Exception<br />
Dim strExceptionMsg As String = "Error Executing GetAS400InvoiceDetails(): " & ex.Message & "\r\n"<br />
Throw New Exception(strExceptionMsg, ex)<br />
<br />
Finally<br />
<br />
objConnSelectFloatSQL.Close()<br />
End Try<br />
<br />
Return MyCompanyCode<br />
End If<br />
<br />
<br />
End Function
Now, my problem is, that the function needs to loop through itself to bring back a certain level(a string in the DB). Basically if I return say level 5, it has to go back to the function again, it will bring back level 4, but it has to go back, until it brings back level 3. My problem is this - I get the correct level (3), but I also bring back two empty strings, and that overrides my first value.
Say I get CompCode = "001"
It returns "001", "" , "" and thus FGBS1 = ""
How do I get pass this?
|
|
|
|
|
It has something to do with recurrence. Each time it is called, another string is returned. Try this:
Public Shared Function getCompanyCode(ByVal strDivisionCode) As String
Dim DivisionCode As String = strDivisionCode
Dim ReturnedCompanyCode As String = ""
Dim MyCompanyCode As String
Dim CompanyCode As String = ""
Dim CompanyLevel As String = ""
Dim objConnSelectFloatSQL As SQLConnection = New SQLConnection(DB2TestConnectionString())
Dim selectFloatSQL As String
Try
If DivisionCode <> "" Then
'Level 4/5
selectFloatSQL = "SELECT CompCode, CompNum from tblComp where CompNum = '" & DivisionCode.Trim() & "'"
Dim objCmdSelectSQL As SQLCommand = New SQLCommand(selectFloatSQL, objConnSelectFloatSQL)
objConnSelectFloatSQL.Open()
Dim objDr As SQLDataReader = objCmdSelectSQL.ExecuteReader()
While (objDr.Read())
CompanyCode = objDr(0).ToString.Trim()
CompanyLevel = objDr(1).ToString.Trim()
End While
objConnSelectFloatSQL.Close()
MyCompanyCode = CompanyCode & "," & CompanyLevel
Else
MyCompanyCode = "LEVEL does not exist for:" & strDivisionCode
End If
Catch ex As Exception
Dim strExceptionMsg As String = "Error Executing GetAS400InvoiceDetails(): " & ex.Message & "\r\n"
Throw New Exception(strExceptionMsg, ex)
Finally
objConnSelectFloatSQL.Close()
End Try
Return MyCompanyCode
End Function
I return both the company code and level.
Then do this when you call it:
Dim FGBS1 as String = getCompanyCode(strDivisionCode)
while FGBS1.Substring(FGBS1.IndexOf(",") + 1) <> 3
FGBS1 =getCompanyCode(strDivisionCode)
end while
It's not as elegant as using a recurring function, but I think doing something like this will solve your problem.
|
|
|
|
|
Would this fix it:
If CompanyLevel <> "3" Then ' either level 4 or 5
MyCompanyCode = getCompanyCode(CompanyCode)
Else 'if level 3
MyCompanyCode = CompanyCode
End If
Else
MyCompanyCode = "LEVEL does not exist for:" & strDivisionCode
End If
|
|
|
|
|
Hi All
I am developing an online shopping web site. The site is similar to any online shopping site where user can select categories from left menu and product will be displayed in middle of page. We had planned to display 6 products per page. As of now we are fine and clear what we need to do.
Main concern is how to bring product data. We are expecting for each category there can be 5000 products and which can grow down the year. Obviously main concern is performance as we are expecting our main users will be dial up users as site will be access from those countries where DSL in not very common. We are in discussion of our product page design and I need your advice which can help me to mitigate any post deployment risks.
I am planning,
1) On Product Page load, I will fetch all the product data (e.g. Product Name, Description, Price, ImagePath, Saleprice, special deals etc…) in DataTable say MyDataTable and cache this DataTable.
2) Now when user clicks on any category from left menus, I will create DataView from cache DataTable by filtering category and bind the DataView with my repeater control.
I believe by this approach I can gain performance hit. For our project performance hit is very critical. Please advice whether I am in correct direction or Not. Please consider this on urgent basis. Thanks in advance for your valuable reply and time
Amit
|
|
|
|
|
Hi.
I hope someone had similar issue and can help me.
I've created a web site and installation set up for the site. I had no problems installing it locally or on a test server but when I tired to install it on LIVE server I've noticed that my files are not installed in the \Inetpub\wwwroot even though the Control Panel->Add Remove Programs showed that the site installed and occupies ##MB. I thought this is strange. When I found the files installed in a different directory and only because one thing. Beside Default Web Site we have VAM (Visual Asset Manager) site installed on our server, which uses port 80 as well. So every time I run install it uses VAM as a default site and installs my site under it (that's why the directory where files installed is different). I was able to work around that issue by changing VAM port to anything but 80 for a while, installing my site, and then changing VAM port back to 80.
The question is: Is there anyway I can specify in my installation to use Default Web Site instead of VAM site even though they both use port 80?
Thank you very much.
|
|
|
|
|
HI
I have an foder which contains Images
And i want to rename them as 1,2,3,4..........
By programetically (all at a time)
Can any one give me an idea on this
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hi,
You can use System.IO.File.MoveFile function for renaming files. Use new file name as target filename.
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
Try the Following Code:-
Dim i As Integer
Dim d As System.IO.DirectoryInfo = New System.IO.DirectoryInfo("D:\R&D\PSFVB\Picss\")
Dim fi As System.IO.FileInfo() = d.GetFiles()
Try
Dim file As Integer = fi.GetLength(0)
For i = 1 To file
Dim str As String = i & ".gif"
fi(i).MoveTo("D:\R&D\PSFVB\Picss\" & str)
Next
Catch ex As Exception
End Try
Thanks & regards,
Suresh Dayma
|
|
|
|
|
HI
Thx for reply
It is working in local system but when i upload to server it is giving "c:/Rename" no directory found
I am using this code
-----------------------
Dim i As Integer
Dim d As System.IO.DirectoryInfo = New System.IO.DirectoryInfo("C:\Rename\")
Dim fi As System.IO.FileInfo() = d.GetFiles()
Dim l
l = fi.Length
For i = 0 To l
If Not i >= l Then
Dim str = i & ".jpg"
fi(i).MoveTo("c:\Rename" & "/" & str)
Else
Exit Sub
End If
Next
I want to put it in server
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
May be you need to use server.Mappath to get the folder location.
Best Regards,
Apurva Kaushal
|
|
|
|
|
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true">, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
Add the following Code in your Web.Config file.
<identity impersonate="true">,
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Thanks & regards,
Suresh Dayma
|
|
|
|
|
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
Add the following Code in your Web.Config file.
<identity impersonate="true">
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Thanks & regards,
Suresh Dayma
|
|
|
|
|
Sorry, I forgot to add the code. The Code is <identity impersonate="true"/>
With regards,
Suresh Dayma
-- modified at 6:05 Friday 25th August, 2006
|
|
|
|
|
Yes I added that one
But still it is giving same error
" Could not find a part of the path "C:\Rename"."
Is the code is right which i use
----------------
Dim i As Integer
Dim d As System.IO.DirectoryInfo = New System.IO.DirectoryInfo("C:\Rename")
Dim fi As System.IO.FileInfo() = d.GetFiles()
Dim l
l = fi.Length
For i = 0 To l
If Not i >= l Then
Dim str = i & ".jpg"
fi(i).MoveTo("c:\Rename" & "/" & str)
Else
Exit Sub
End If
Next
------------
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Its working fine on my pc.
Have you tried this
Right-click the Rename Folder
Select the Security tab
then click "Add" to add the appropriate user or group.
Highlight the asp.net A/c, and Check the boxes for the desired access
The code which you have written is correct.
Thanks & regards,
Suresh Dayma
-- modified at 6:28 Friday 25th August, 2006
|
|
|
|
|
Hi
Yes tryed still
I dont know where i am doing wrong
I put the folder in sharing
But still not getting
Help me on folder permissition
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
There is no need to put your folder in sharing.
Try this:-
Right-Click your Rename Folder.
Select the Security Tab
Select your User Name.
Set Full Control for your User name or
you can click on the advanced button and select the Effective Permissions Tab
and then click the select button and add your username in the given textbox.
finally,click the ok button to make necessary changes.
Hope this will help u out of your problems.
Thanks and regards,
Suresh Dayma
|
|
|
|
|
Hi!
In facts, my problem is to access the info in the server side! If i use ListBox.Items... It is not working but I really have two rows in my listbox... Look this:
This is my javascript code:
First i select the item in listbox1 then click on add button so add seleccted item into listbox2 and remove selected item from listbox1 using javascript.
function fctAjoutAssigne()
{
var mylist = document.getElementById("ListBox1")
var mylist2 = document.getElementById("ListBox2")
mylist2.options[mylist2.length]= new Option(mylist.options[mylist.selectedIndex].text,mylist.options[mylist.selectedIndex].value);
mylist.remove(mylist.selectedIndex)
}
and at last i click on save button. code of save button is :
For i = 0 To ListBox2.Items.Count - 1
strAssignation &= ListBox2.Items(i).Value & ","
strNomAssigne &= ListBox2.Items(i).Text & ";"
Next
But ListBox2.Items.Count = 0
even If I have two items in my list...
Amazing...
if you know then tell me how to fix this.
chetan patel
|
|
|
|