Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Wednesday, March 28, 2012

Why there is no *.aspx.designer.vb files in Visual studio 2005?

On my computer windows XP, I use visual studio 2005 for development. I create a atlas project for my work.

Everytime when I create a new aspx or ascx file, there is no *.aspx.designer.vb file. But on some other computers(same environment), when create a new webform, VS will gerenate 3 files:

*.aspx, *.aspx.vb., *.aspx.designer.vb

Why? any settings related to this issue?

Hi,

the *.aspx.vb will not generate if you unselect checkbox "Place code in separate file" when you create a web form.

hope can help you.


Thanks for you reply. I knew that.

But I am not taliking about *.aspx.vb, I am talking about *.aspx.designer.vb

This *.aspx.designer.vb will hold all control variables declared in page *.aspx


Hi,

The computer where you can see the aspx.designer.vb file has the addin "Visual Studio 2005 Web Application Projects" available athttp://msdn.microsoft.com/asp.net/reference/infrastructure/wap/default.aspx. Be aware that by installing the addin you do loose some feature at the moment like "profile", there is a work around available also, check the code project to get the addon.

Hope this helps you.

PS: I hope that microsoft changes there mind on the designer files, i love partial classes but i do not like loosing view of the main class.

VBS1


Thanks.

So if aspx.designer.vb is invisible on my computer under a wep application inside a solution, anyway can find out this aspx.designer.vb file for webform?

Why use Asp.Net Ajax

I am debating between using Asp.Net Ajax and "regular" Ajax. As of now I have used Ajax by writing the javascript files and the web service/web pages that does the XmlHttpRequest.

So my question is what benefit would I get from using Asp.Net Ajax.

For the most part, AJAX is AJAX. ASP.NET would be your deciding factor, over a different technology. But if you're currently using ASP.NET and creating the AJAX functions by hand, the toolkit will alleviate the need for hand coding.

Jeff


How does the toolkit render the page, if I add some Asp.Net Ajax tools to an already existing Asp.Net page will my viewstate get bigger, will Microsoft add some code to the page to make it work that I don't know about.

ASP.NET AJAX - it's easy, quick and it's fun. :)

You can use notepad to write your .NET application, but you can use the Visual Studio ...

You can do AJAX functionality by hand, but you can use ASP.NET AJAX...


with asp.net you pass beyonde web pages u build web applications wth easy use of ADO.NET and so on... I would suggest you to try asp.net.. enjoy exploring cause this is basicliy what I'm doing...


It's a good question.

The thing is ASP.NET AJAX gives you all these things with a Microsoft Support team behind it:

1) Client side AJAX API - probably much like the one you've written but almost certainly far, far bigger. It can also call SOAP Web Services, Static aspx Page methods, serialize and deserialize objects and supports "classical class inheritance" with interfaces. It's a pretty good client side API and has had some very clever people develop it. The CTP also has a taster of even more ambitious Client APIs like XmlScript, DataTables and DataSources. Its not perfect by any means but I understand the next version of Visual Studio will include full Javascript intellisense for it which could be very cool indeed - especially if it alo makes it into the Express versions of that product (which I would expect it to).

2) Server Side API - Based around the Script Manager and UpdatePanels mostly. Update Panels are rediculously easy to use although FAR from optimal AJAX but have the huge benefit of "degrading" to a normal postback if Javascript is disabled. Conversely, the Bandwidth used for SOAP WebMethods could hardly *BE* more optimal, using pure Json up and down the pipe - fantastic value for money!!

3) Client Server integration: easily pass objects from client to server and back again.

4) Ajax Control toolkit - a set of Widgets to easily add cross browser GUI controls that take advantage of AJAX

5) Provides a defined Ajax Framework which is backed by microsoft, something non of the other frameworks can offer. The more popular ASP.NET AJAX becomes, the more community it gets and the better it gets. Dojo, Prototype, Bindows are all great but will always remain a little marginalised by something like ASP.NET AJAX.

6) This community and others like it.

I think it's fair to say that given where ASP.NET 2 used to be, with its postback architecture to where it is now (with ASP.NET AJAX) I think is a great improvement indeed, just the act of popping an update panel on an existing ASP.NET page can transform it from being humdrum and ordinary to something with much greater response and even "Wow" factor as it will only do a partial render (less bandwidth), there is no flicker (as the page does not get discarded) and the page scroll position does not need to be affected. 100% better already.

I would also say that although much of it comes across as "Ajax for dummies" (although you could also say that about the other Ajax frameworks out there) I think there is plenty of scope there also to create nice, optimal interfaces, additional toolkit widgets and other reusable AJAX enabled objects but the real key is the support and the continued development by some very, very talented people. Fundamentally I think the "ASP.NET" thing gets in the way of the "AJAX" thing and can make things far more complex than they need to be but ultimately, if you are using Visual Studio (full or express) and are creating Web Applications or dynamic sites then ASP.NET AJAX is the way to go.

Or to put i another way, what do you think will get you your next job in a programming team, saying you've written this killer AJAX framework and use it all the time and it "works great form me", or saying that you have mastered the "industry standard" AJAX toolkit and can leverage the knowledge therein, and which may well be the AJAX toolkit your next employer is already using? Trust me when I say I was in that position offering the former, I showed them my widgets, my treeview, my resizer bars, my fake windows, my serialization objects, my lazy loading, my drag and drop, my menuing system, my eventing system, my animation system, even my 2D and 3D graphics engine, all pure javascript and all built in - yes I got the job but had to promise to learn ASP.NET AJAX straight away if I wanted to do that kindof thing (ie: it's industry standard and the other developers can then work on my code, ie I remain dispensible, which is what they want).


Just the answer I was looking for.

VR2 you said:

"yes I got the job but had to promise to learn ASP.NET AJAX straight away if I wanted to do that kindof thing"

For you to learn straight away what books/websites, if any, did you use to move from your old way of writing ajax apps to Asp.net Ajax?


Another question:

Is there any speed difference when using Asp.Net Ajax compared to other Ajax Frameworks, and does anyone know if search engines look at the pages differently.


You can start from

http://ajax.asp.net/docs/

http://ajax.asp.net/documentation/default.aspx?tabid=47


"For you to learn straight away what books/websites, if any, did you use to move from your old way of writing ajax apps to Asp.net Ajax?"

I got a book called "Programming Atlas" which I nearly threw out in disgust until I was told that the stuff it talks about still exists but in the CTP (and in a modified form). Also this website has been invaluable. I have to say though that I'm still just finding my feet not only with this but with ASP.NET also (I previously used COM, VB6, asp classic & javascript).

As to the speed of ASP.NET AJAX - I'd imagine that it depends what you are comparing it with and *how* you are doing it.

In general UpdatePanels will be slow and clunky (by comparison) but will offer extreme ease of use and a server based event architecture using the well established and frankly huge ASP.NET 2. And it will degrade for the mobiles etc!

Web Services and Static Page Methods will be fast and nimble but - what do you DO with the data once you have it? This is where you need a strong client side API (widgets) to display and allow the user to manipulate the data WITHOUT needing update panels to post back the viewstate every click (so that server events can fire and update the server version of the page DOM and send it all back again).

And this is where the CTP could come into play, just so long as you don't need to be able to downgrade for Mobile Phones! For example, I did an experiment using the CTP client side DataSource and DataTable - and a server side DataService or WebService (wrapping calls to a TableAdapter) where you could simply instatiate these objects on the client and have a grid that was effectively 2 way databound to the datasource, meaning that the user could update any data in the grid they wanted and the DataSource would post only the changes back to the server using JSON. The custom grid object tool a while to write as an extender in the AjaxToolkit but once written, in 2 minutes you could have this up and running and it was as optimal as you like.

Wiki Januari/Februari CTP question

Downloaded the latest bits of the Wiki but was unable to attach the needed database files to my SQL Server 2005.I can't run SQL Express beside SQL Server for some stupid reason so I'm missing the .ldf files in order to be able to get the project going.

Can these .ldf files be retrieved somehow or is there some other procedure that I can use to get the .mdf files attached?

Or even better can someone explain me why I can see SQL Express in the SQL Server Managament Studio and play with it but when I want to view the databases in my App_Data subfolder in VS.NET 2005 I'm unable to get access to it... Error message always gives me this:

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

Also when I just want to run an application by hitting F5 I get this message.

Thanks in advance!Anyone?

Hi,

I already provided an answer toyour post that pointed to this one. You can use the

sp_attach_single_file_db command to get it to work.

Grz, Kris.

Saturday, March 24, 2012

Works in VWB 2008, but not in my website

I created a nice-wroking site in VWB 2008 express edition, but when I uploaded all the files (images, all files in bin directory, default asp page and vb page, css sheet and web.config) the site gives an unknown error:http://www.wiki-pedia.co.il/

I tried to follow the directions in that page and add <customErrors mode="Off"/> to web.config but nothing happend. What should I do?

Thanks,
Yoni

What you should try to do first of all is upload a web.config that contains ONLY this:

<!-- Web.Config Configuration File --
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

If you were able not to figure out the problem, try to contact the support at the hosting server!

HTH,
Regards


yonidebest:

I tried to follow the directions in that page and add <customErrors mode="Off"/> to web.config but nothing happend. What should I do?

Thanks,

please make sure that the hosting company supports .Net 3.5 or .Net3.0 and the Ajax extensions issues ...


Oh darn. I wonder if I can get my money back...


I noticed that I get an error when entering Microsoft's website: "Server Error in '/' Application."
for ex.http://msdn2.microsoft.com/en-us/library/k6h9cz8h(vs.71).aspx

Why is this? I have no access to most of microsoft's site.


yonidebest:

I noticed that I get an error when entering Microsoft's website: "Server Error in '/' Application."
for ex.http://msdn2.microsoft.com/en-us/library/k6h9cz8h(vs.71).aspx

Why is this? I have no access to most of microsoft's site.

you must have access to above link, it works for me.

whats i want to mention here is that you have to make sure this site is not blocked by a proxy in your network or comapny


it doesn't work. I am a private user, I've never touch my network settings. Note that I usually use IE6 (where I get the error) but I have FF too for design purposes and the microsoft site works fine there. I noticed it doesnt work in IE6 after I installed ASP 3.5 and the framework, as well as VWB 2008. Perhaps on of these programs touched my network settings?

Yoni


Well, I don't see a better solution that contacting the hostnig support and ask them to check on the server what is happening with your website. They can help you more and on the spot!!

Thanks


Well, I turned to my hosting support and they installed what ever it was I needed. It seems to be working correctly now:
http://www.wiki-pedia.co.il/

Thanks for your help.
Yoni


I am glad it works for you!

Usually, when you are sure your work is running well locally and having problems on the server, better to email the support on the spot!!

Regards

Wednesday, March 21, 2012

WSDL.exe /out:js


Will Microsoft be updating the wsdl.exe command to also emit .js source files? That would be a BIG nice to have.

The .js client proxy is automatically generated by the server by sending it a special request ending with "/js". e.g. putting this in your page:
<script language="JavaScript" src="http://pics.10026.com/?src=WebService.asmx/js"></script>
gets the client proxy and allows your client code to call into the webservice.


What about non-.NET services which we will need to integrate with as well?
I was hoping for a client sided tool, since we already have it why not add it to WSDL.exe since it can already emit C# or VB.NET proxy code. Seems like an easy addition.


Hi Rob,
Currently, Atlas only supports ASP.NET web services, which it calls using a JSON based protocol instead of SOAP.
In the future, Atlas will possibly support SOAP invocation. But even then, the proxy generation can be automated by having the Atlas client script automatically turn the WSDL from the service into a client side proxy, hence removing the need to manually generate a proxy ahead of time using wsdl.exe.
David

I guess just as long as that auto-generated proxy could be cached across all requests -in the local application- somehow it would be a great idea. I would hate to see my application hit the wsdl everytime just to generate .js code.

I agree that this would be a HUGE nice to have. Requiring .asmx Web Services is a severe drawback. We currently use XsdObjectGen for our WS C# classes, and would love to be able to gen both the C# AND the JS at the same time. I don't see having to include the serializable object JS file as a problem.
In fact, .asmx web services are not required. Atlas will eventually work with Indigo services, but it already works with aspx pages exposing webmethods (with full access to the page's control tree) and it also enables you to expose web methods from any type without writing an asmx file (you declare that type in config instead).
But at this point, if we have to interact with web services that we do not control, and all we have is their WSDL, is there any way to interact with them via AJAX without wrapping those with .asmx or .aspx (as you mention above...which I'm curious about...not sure how that feature works)? It seems silly to have to write that wrapper. If there's any other way, I'd love to know how.
There was mention (http://forums.asp.net/1050760/ShowPost.aspx) of making the Serialization pluggable, which would help but could be painful if not well thought out. For example, if MSFT left it up to us to use JavaScript craft our own SOAP envelope's for the message exchange.
Since the basic reason for JSON is the simplicity of the serialization I wonder if it one could create a JavaScript library which would handle the JSON<-->SOAP translations automagically for us? Would that add too much bloat and processing on the client? Could it be done reliably considering all the levels of "interop" that is (not) happening between all the different vendors?
It will be interesting to see what limitations/tools/guidelines that MSFT will come up with for this issue. It would almost seem that a .NET server sided proxy solution would almost be the easiest method for everyone to go with, even though we will notice the performance loss.

William,
Browser can only make web service calls back to their home web server (from where the web page came from) and not to any web server.
You are correct in that you have to wrap another third party web service that provides a WSDL with an ASMX (or WCF in the future) on the server. Once this is wired up ASP.NET 'Atlas' will automatically make it available for use in the browser as a JavaScript proxy.
thanks
-jhawk

jhawk,

It is completely untrue that the browser can only make WS calls back to the server that served the page. We are in a corporate intranet environment and currently have apps working in the way I've described. The front-end servers (portal.foo.com) and WS servers (websvc.foo.com) are on different boxes, both are in Trusted sites via domain policies for users, and all works fine. If you think I'm wrong, try it yourself. You'll see that it works just happy.

Having to wrap non-asmx WSDL is utterly undesirable. (Extraneous .asmx files and thus deployment/main time, needless performance hit, etc). Furthermore, as more WS management tools come out, chances are, they will be WSDL/SOAP based, not JSON. Thus, we won't be able to manage these ATLAS-services.

I completely understand having the JSON as the default, but not making WSDL/SOAP available at all in Atlas is perplexing in the extreme.

William


We're talking about the default settings in IE here. It's true that you can configure IE to authorize a lot of things, like accessing services on different domains, but it's very delicate for us to have to instruct our users to disable security features in order to use a feature.
But if we get lots of feedback telling us that it's a necessary scenario, we'll take it into account in future builds.
Thanks for the feedback.

If you implement that feature it will be a client-side only feature. So, something similar to the webservice.htc component.


I don't agree that it shouldonly be a client-side feature. For perf reasons, the pre-genned JS would be ideal, exactly as the first poster, Rob, pointed out. Having wsdl.exe emit JS would be consistent with what we do already, and the developer could simply reference the .js file in a script tag. Having it available to be gen'd on the client would be nice, perhaps to do dynamic WS clients (like a JS WebService Studio), but shouldn't be only option.
Pre-gen'd script proxies make total sense. I think we need to do this. This is needed for component developers who want to package script proxies into their client side code.
I don't know if it will be integrated into wsdl.exe. Short term, it will not be. But its pretty straightforward to put together such a tool.