Solved

XML Spreadsheet (Compiler Error Message: BC30203: Identifier expected)

Posted on 2009-07-16
4
593 Views
Last Modified: 2013-11-08
Hi Experts,
I am trying with XML Spreadsheet,
I use namespaces as shown in "Code Section".
Please find error message in attached text file.
I have this code in "xx.aspx.vb" file.

I get error for <xmlns> namespace, this code works perfectly in my local PC through VS 2008 IDE. But when deployed in server I have "Compiler Error Message: BC30203: Identifier expected".
I have set IIS Server --> Website Property --> ASP.NET --> ASP.NET Version =2.0.50727
Restarted IIS server, verified if above setting still exist.
.Net Framework 3.5 is also installed in the server.
Even after above settings I get error

Please suggest how to fix, its urgent.
Imports <xmlns="urn:schemas-microsoft-com:office:spreadsheet">
Imports <xmlns:o="urn:schemas-microsoft-com:office:office">
Imports <xmlns:x="urn:schemas-microsoft-com:office:excel">
Imports <xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
Imports System.Linq

Open in new window

xmlns-Error.txt
0
Comment
Question by:arunkumarmanas
  • 2
4 Comments
 
LVL 21

Assisted Solution

by:Craig Wagner
Craig Wagner earned 20 total points
ID: 24899574
In VB.NET the Imports statement is used to make .NET namespaces available to the application code so you don't have to fully-qualify every reference to framework object. For example:

Dim writer As System.IO.StreamWriter

vs.

Imports System.IO

Dim writer As StreamWriter

I've never seen Imports used to reference XML namespaces in that way.

http://msdn.microsoft.com/en-us/library/7f38zh8x.aspx

I'd say remove the first four Imports statements and you should be fine.
0
 

Accepted Solution

by:
arunkumarmanas earned 0 total points
ID: 25125364
I moved "Imports" lines and other lines of code which was giving error to New Class library Project (in the same solution). build this to get dll, referenced this dll in web project then it worked fine.
I guess these Imports (XMLNS) are not supported in website (project).
0
 

Author Comment

by:arunkumarmanas
ID: 25125374
The solution I tried out worked
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question